Hello, I am making a top down shoot game.
My spaceship should rotate towards the mouse position, but it is not working properly.
https://imgur.com/0vOGeDL
It rotates like this, when the tip of the spaceship should be facing to the mouse.
I have tried with look_at(get_global_mouse_position())
and with this another code:
var look = get_global_mouse_position() - global_position
global_rotation = atan2(look.y, look.x)
both of these code snippets where put in _proccess(delta).
Any idea of how can I fix this?