Calculating Pitch and Yaw offsets based upon roll
I'm working on a 6DOF player character and it's going fairly well, save for the rotation.Using angular impulse is very smooth, but it ends up with lovely desync. So I've gone back to the player controller rotation as player location accuracy is important.
I've dealt with gimbal lock already using a Player Camera Manager
However well using Add Controller Pitch/Yaw/Roll may work for network replication, I have that lovely problem in which pitch and yaw work perfectly fine, unless you're rolled 90 or 270 and then pitch becomes yaw and yaw becomes pitch. The player controller always rotates the pitch straight up and down no matter how the character is rotated and likewise with the yaw.
So to make a long story even longer; is there a blueprint or code based way that I can either calculate the proper amount of pitch or yaw to apply based on rotation, or is there a way to force the controller's orientation to be relative to the character?
asked Aug 04 '18 at 03:14 AM in Blueprint Scripting
Turns out it wasn't necessary. I got halfway through the math (it was starting to work) and discovered https://answers.unrealengine.com/questions/358283/quaternion-solution-to-mouse-look-pitch-and-yaw.html in this post that all I needed to do was set the controller rotation manually after updating the actor rotation.
So now I have accurate transform replication and 6DOF control.
answered Aug 05 '18 at 08:36 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here