Good day people,
I’m struggling with an issue related to rotating the player actor in SixDof.
I have an input (Pitch, yaw and roll) FRotator.
To ensure calculations are done the Quaternion way i’m storing these in my blueprint as Vector4 structs.
Firstly I use a Slerp function to have the input increase/decrease over time:
For the actual rotating of the actor:
- Transforming the input to worldspace using the actors transform, to ensure that moving right is actually going right based on the orientation of the player actor.
- Using a Slerp function towards the new target rotation(quaternion).
My issue:
I get a very weird readout after a small lagspike of 270ms that occurs on random occasions, making the step toward the new rotation, way too big! Causing a very large rotation change ingame ranging from 10 to sometimes
180 degrees.