How to display a dot and vector emitting from that dot (beginner programmer)
Hello,
I have two 2-vectors, Stick and Tensor, Stick is simply the current x-y input from a joystick, Tensor is a vector that I have made relating to the inputs as well as other things.
Both of these are determined elsewhere, i have them ready, just need to be used.
I need the following to show up somewhere on my screen (top left, bottom right, thats irrelevant):
A box representing the max/min values for the joystick input, ([-1,1],[-1,1]) so -1 to 1 in x and y.
A dot that shows the current position of the joystick input (this is pulled from Stick which is a 2 vector that is already generated)
A Vector starting at the dot (stick position) extending like Tensor. I.e. say stick is (1,0) and Tensor is (-1,0) then its a dot at (1,0) with a vector of length 1 going straight left from the dot to (0,0). Notice, Tensor is not a unit vector. it may be (3,5) or anything else. the vector doesn't have to be bound to the box in any way, just has to emit in the right direction at the right size. simple colors for debugging purposes.
really I just need to show where the joystick is, and where the Tensor is pointing (starting at the joystick position "Stick") and how to draw that somewhere on the screen so that I can figure out other things later, mostly this is for debugging my game so its really just got to be super simple.
Thank you in advance
ps. some people have asked questions about things and I've seen it suggested I make a texture, but I have no idea what that means in the given context, I coulnt find how to create one.
pss. I am working in 3d, its just a UI element im asking for help with.
Your answer
Follow this Question
Related Questions
Basic graphic for debugging purpose - how to draw dot at some position in box and vector from dot? 0 Answers
Is there a way I can make one script for all my buttons in my game? 1 Answer
Scripts Interfering With Each Other 1 Answer
[Beginner] [UI text] Adapt the size of the text zone to the text inside 2 Answers
How to limit the max and minimum number in a input field. 1 Answer