I want a cursor that tilts depending on the direction your moving your mouse. I got it done in construct a long time ago but I wanted to make it in Godot fixing the problems I bypassed with wacky solutions back then.
The hand sprite detach from the mouse position when the mouse starts moving and that's how I got the angle I needed to rotate the hand and depending on the distance from the cursor the sprite would move faster.
My Idea this time was to take a position in the same direction the mouse is moving but further away depending on the speed of the mouse, then make the hand look at the reference point.
I started by setting the reference point at
get_global_mouse_position() + Input.get_last_mouse_speed() and it works but the inertia is too strong.
draw_line(get_global_mouse_position(), marker_vector, Color(255, 0, 0), 1)
I drew a line and realised that even thought draw is called every frame the position of the point is a bit chunky and it doesn't look as smooth as I was thinking. Lastly when I printed
get_global_mouse_position() + Input.get_last_mouse_speed() the resulting Vector2 had nothing but integers on both axis. I don't know if this is the cause of the chunky movement but I can't come up with anything else.
If i ditch the
get_last_mouse_speed() method how can I get a vector2 in a direction x distance away from the mouse position