FQuaternion

While doing this, I decided to implement it myself before watching the video and did not know that AddActorLocalRotation had the option for Rotator and Quaternion.

My question is why did FQuaternion not work? It turned the tank by 90 degrees each frame.

Edit: I’m seeing that Rotator is just the convention now but I’d still like to know.

What value quaternion did you use?

I used Identity

You passed that directly to AddActorLocalRotation?

Nope.

This was my function.

FQuat DeltaRotation = FQuat::Identity;
DeltaRotation.Z = value;
AddActorLocalRotation(DeltaRotation * UGameplayStatics::GetWorldDeltaSeconds(this) * RotationSpeed);

And what did you use for RotationSpeed? Quaternions aren’t degrees, if you used a value like 45 then that would be an insane amount. Try a value of 1 or 2.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms