Cannot rotate beyond 90 degrees Pitch (Rotate around Y-axis)

So for this lesson we learnt about using the FRotate and use SetActorRotation() make platforms rotate around its axis.
I’ve noticed that only the Y-Axis (the Pitch) does not work as intended. The rotation won’t rotate beyond 90 degrees. The other 2 Axis seems to work fine though.

I worked around it by simply not using the Y axis lol, but I was wondering if this is normal behavior.

4 Likes

That would be because the Pitch is a value between -90 and 90. When you get to 90 it will start going the other way which isn’t going to work by using a calculation that is always adding to it.

This can be resolved by using AddActorLocalRotation instead

AddActorLocalRotation(RotationVelocity * DeltaTime);
4 Likes

Thanks, it works as expected now!
Didn’t know about the -90 and 90 part! I wonder if it is the same or similar problem to the Gimbal Lock problem.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms