Dear Community,
I run into an issue since months : Rotation snap + jitter on the Pitch axis at 90 and -90 degrees with rotation matrix or quaternions!
The situation : I rotate a Pawn around a Sphere. The location of the Pawn and the Sphere are the same. My keyboard keys are used to move (Up/Down and Left/Right). The Pawn is composed of these hierarchical elements : Collision Box (root) > Scene > Spring Arm (with Lag) > Camera.
Here is a video of the problem : https://drive.google.com/file/d/1GIroYocDp3GmvCfBf7hJfMmhYlU_DHm4/view?usp=sharing
The last and best code currently (in Pawn) :
FQuat Old = this->GetActorRotation().Quaternion();
FQuat Delta;
(iMoveX) ? Delta = FQuat::MakeFromEuler(FVector(0.0f, Calculation, 0.0f)) : Delta = FQuat::MakeFromEuler(FVector(0.0f, 0.0f, Calculation));
FQuat New = Old * Delta;
this->SetActorRotation(New);
I tried a lot of different methods with matrix and quaternions, in local or world space, with or without FRotators… But I always encounter this issue only on the pitch axis.
Thank you for help!