I would like to calculate the angle between the two vectors of a dot product equation. The first vector is the source Node's facing vector or "front" vector. The second vector is the direction vector that points at the target Node from the source Node. For example:
var direction: Vector2 = $A.global_position.direction_to($B.global_position)
var facing: Vector2 = $A.global_transform.x
var dot: float = facing.dot(direction)
var degree: float = rad2deg(acos(dot))
This seems to work, but is there a different/better way? I found angle_to in the docs, which I don't fully understand, and angletopoint, which locks to the X-axis and won't work I don't think.