Hi, I want a RigidBody2D to rotate towards the player using
_integrate_forces(), but I can’t find the right formula to achieve that. My understanding is I have to find the direction (an angle in radians, I guess?) towards the player’s position and then rotate in one or the other direction until the RigidBody’s rotation matches.
If I’m correct, finding out that angle works via
(player.global_position - global_position).angle() – but what do I compare it to to find out what torque to apply?