Hi, I am making an Aircraft Simulator. I am facing a lot of problem with FRotator calculations.
To avoid gimbal lock when adding FRotators, I used this
This works ok but there is a slight jerking action when the actor hits the gimbal lock and skips over it.
Oher than that, sometimes I want to change the Roll of the Aircraft when the Yaw changes(giving an tilting action when going sides). But when I change both at the same time, the pitch also changes.
Should I rewrite the whole system using Quaternion? Will that work?
To avoid gimbal lock when adding FRotators, I used this
Code:
FRotator CurrentRot = GetActorRotation(); FTransform RTrans(CurrentRot); RTrans.ConcatenateRotation(NewRot.Quaternion()); SetActorRotation(RTrans.Rotator());
Oher than that, sometimes I want to change the Roll of the Aircraft when the Yaw changes(giving an tilting action when going sides). But when I change both at the same time, the pitch also changes.
Should I rewrite the whole system using Quaternion? Will that work?
Comment