my sprite rotation is off by 90 degrees

Godot Version

4.4

Question

I am trying to aim my turret at the location of my mouse but whenever it aims, it is off by 90 degrees.

extends Area2D
var Mouse_Position

func _on_body_entered(body: Node2D) -> void:
	print("Game Over")
	queue_free()

func _physics_process(delta: float) -> void:
	look_at(get_global_mouse_position())

So your sprite is a child of the Area2D? My guess would be that you sprite is not pointing to the ‘right’/matching rotation 0. If so you should rotate your sprite so that the default rotation matches an angle of 0 - i.e. rotate the sprite by ±90deg so that it faces to the right by default.

2 Likes