My mouse has the camera attached as a child, and is allowed to rotate. I now want the player to be able to move based on the movement of the mouse, but everything I've done so far makes it spin unless I put the mouse back at its original location.
What I did so far:
mouse_speed = Input.get_last_mouse_speed()
if mouse_speed.x > 0:
self.rotation += abs(mouse_speed.x) / 15000
elif mouse_speed.x < 0:
self.rotation -= abs(mouse_speed.x) / 15000
I would like to simulate the camera rotation similar to how some 3d games work- only just for the z position as this is a top-down 2d game.