Advertisement
iniside

gimbal lock

Mar 2nd, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1.         CurrentRotation.Pitch = 90;
  2.         CurrentLocation.X = Floor.Location.X + 51;
  3.         SetActorLocation(CurrentLocation);
  4.         FQuat Quat1(CurrentRotation);
  5.         FQuat QuatZ(FVector(0, 0, 1), CurrentYaw*DeltaTime);
  6.         FQuat rot = Quat1*QuatZ;
  7.         NewRotation = rot.Rotator();
  8.         SetActorRotation(NewRotation);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement