Character won't rotate properly

Just put a cap on pitch angles. Look, I don’t know your exact setup or how convoluted it is, but if you’re having gimbal lock issues, then just cap the angles. What’s really weird is now my pitches are showing 90 to -90. On another project of mine, they range from 90 to 0/360 to 270.

How this example works: I’m just using the mouse “lookup” axis in the third person template because I’m being lazy. Use whatever axis you need. The multiply by -10s are just to invert the direction and the 10 is just making it rotate faster.

It then gets added with the actor’s CURRENT pitch angle as in BEFORE it before it actually modifies the actor’s rotation. It enters into the first branch, which compares that value to +89 degrees. If it’s greater than that, you set the “actorlocationandrotation.” Just plug in the current location, current roll and yaw. However, for the pitch, you manually set it to 89. This is your “limiter,” by the way.

If the current pitch and amount getting added to it are NOT greater than 89 degrees, then it proceeds into the next branch. From there, it does the same thing, but compares vs -89 and if the number will be less than -89. Again, if it is, then it caps it to -89.

If it passes both limit tests, then it proceeds to adding the positive or negative axis value to the actor’s local rotation.

Try something along these lines and it will work fine for you.

Here’s a quick clip showing it working and preventing the yaw from spazzing out:

v=66_qRplWLAM