Ok, so I have a ray that's coming down from a known angle. I know the angle, the ray's length, the top and bottom end's coordinates. I chose a predefined (x,y) bottom end and with sin() and cos() I managed to determine the (x,y) position of the top end of the ray in order to maintain the angle. But what I've done so far is draw the ray in it's starting position. In order for me to move it while maintaining the angle, I need velocity.
I have this example
but I just can't figure out how to calculate that velocity. If you guys could throw me some piece of code or make me understand how to do it, I would be so grateful.
Andrei.
1