Basic graphic for debugging purpose - how to draw dot at some position in box and vector from dot?
Hello,
I have two 2 vectors, Stick and Tensor, Stick is simply the current xy input from a joystick, Tensor is a vector that I have made relating to the inputs as well as other things
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 doesnt 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, given by Stick, and where the Tensor is pointing (starting at the joystick position Stick)
Thank you in advance
Your answer
Follow this Question
Related Questions
How to display a dot and vector emitting from that dot (beginner programmer) 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