Issue with Dot Product

Hello! Your calculation seems to be working fine, the Dot product is an operation that returns a value in radians instead of degrees.
3.14 radians are equal to 180 degrees. Half of that, 1.57 radians equal 90 degrees, which is similar to the 1.54 you’re getting in your second screenshot.

To transform a value from radian to degrees you can use FMath::RadiansToDegrees(rad);

Depending on what you’re trying to implement, doing it this way may be enough, but you will be unable to determine if the angle is clockwise or counterclockwise because it returns the same value for both cases. If you need to determine the angle direction, you’'ll have to use Atan2

2 Likes