In which direction does the Node2D rotation point?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By nanto2016

https://raw.githubusercontent.com/godotengine/godot-docs/master/img/node2d_get_angle_to.png
In this image, which can be found in the Node2D docs for get_angle_to(), the rotation seems to point in a direction, but rotation is only a float, so when rotation is 0, where does this point?

Nowhere, rotation is not a direction. You can pick any starting angle and consider the rotation from there.
But in mathematics, when it comes to a unit circle, If I recall correctly it is pointing to the right by default.
And even on this picture, as you can see, Node2D.rotation is relative to the positive side of the x axis (right).

zhyrin | 2023-06-30 06:46

:bust_in_silhouette: Reply From: Vadalken

rotation is a float and get_angle_to() returns a float. The float number of red_vector.rotation corresponds to the red angle in image. The float number returned by red_vector.get_angle_to(point) corresponds to the green angle in the image.

rotation does not point anywhere, but a vector with rotation will point as though it is rotated rotation radians away from the x-axis. If rotation = 0 then this will be along the x-axis (this is horizontally right in the image).