Correcting for unwanted Roll when Rotating on all 3 axes locally

621 views Asked by At

I am making a game in which you can move and rotate freely in all directions/axis. Due to how the 3d rotation calculations works, when changing pitch and yaw, a small roll is induced as well over time.

As I have found out, the only way to do this when applying rotation locally (delta rotation based on input each frame) is gradually compensating for it. How would I do this?

The result should be when I am strafing around an object, my relative up vector should stay the same, like I was moving on a 2D plane.

Thanks Jack

0

There are 0 answers