I am trying to get an Area2D to rotate towards the mouse. Instead of rotating towards the mouse, it splits into two (both are, i think, 50% transparent) and rotates in two different directions instead of just rotating towards the mouse. If I use getviewport().getmouseposition() or getglobalmouseposition() instead of getlocalmouse_position(), it rotates when the mouse moves, but not towards the mouse, and not as fast as the mouse moves.
Here is the related code:
var mpos = get_local_mouse_position()
rotation = mpos.angle()
Could someone please help me?