Godot 4
Hi! I need to calculate angle beetwen two wektors. One points toward right side from the center, and the other one follows the mouse. I know I can use a dot product but I am not shure how to do it. I need some advice how to implement it in my code.
Right now my code returns strange values unfortunetly…
func _angle():
var mouse = get_global_mouse_position()
var direction = (mouse - debug_center.position)
var angle = 90 - rad_to_deg(direction.angle())
print(angle)