Why does camera.alpha keep going up in babylon js?

Hi there, when i console log the cameras alpha it keeps going up in value (when i rotate the camera right). i thought it would stop at 360 and then reset to 0 but it just keeps going higher, why is that? Same as when you keep rotating left, the alpha goes deep into the negative numbers.

Thanks.

Should not really matter, you could just %= 360; it if want.

1 Like

Turning 90 degrees to the right is also turning 270 degrees to the left, or 450 degrees to the right. Or … well, you get the point :slight_smile:
We do normalize that at a certain point, but it actually doesn’t really matter. As @Ontropy said, you can always % 360 the value (after converting it to degrees, since it is technically in radians).

3 Likes