Hi, i am trying to make a top down shooter game. While i want to rotate character with mouse so i used look_at(get_global_mouse_position()) but there is always 90 degree difference between character direction and mouse as following gif:
@esaddag I have similar problem with raycast.look_at. Did you find a solution? Can you share?
few hours later: I gues not =) No problem, some people helped me to solve my problem. You can probably solve yours just by changing Sprite rotation in the inspector. Good luck
Hi.
First of all, move your Sprite2D to be a child of the CharacterBody2D, not as a child of the collision shape. Like this:
Second, I replicated your scene. The look_at function uses as “forward” the vector [1, 0] (basically the red arrow you see in the picture over the character. That direction is given by the CharacterBody2D node.
The solution is simple, rotate your sprite 90 degrees.