I'm making a top down game. So, I'm trying to make my player shoot a bullet (area2D) based on mouse position compared.
When I instace the bullet, I send the angle between the player and the global mouse position to the bullet. The bullet.gd looks like this:
position += (Vector2(cos(angle),sin(angle)).normalized())
But it goes wrong, when the bullet is instanced it mostly just goes at angle 0 or something close to that.
If someone could help me, I wold be very grateful.