Hello! I’m facing the gimbal lock issue and can’t resolve it. I want ro rotate my sprite by pitch. And after 90 it goes crazy. Nothing help me at the moment and i want to try quats. Here is my code:
float dg = tan(1 * 3.141592653589793 / 180.0);
FQuat qt = FQuat(GetActorRightVector(), dg);
FRotator rt = FRotator(qt);
AddActorWorldRotation(rt);
But after 90 degree my sprite flips.
Can some one explain me how to use quats correctly ? Or some workaround ?
Thanks.