I am trying to track the progress of a Quaternion.Slerp and the actual t param doesn’t make sense to me. The docs say “If the value of the parameter is close to 0, the output will be close to a, if it is close to 1, the output will be close to b.”
I have the following C#:
void FixedUpdate()
{
rotTime += Time.fixedDeltaTime/ speed;
Quaternion rot = Quaternion.Slerp(rigidbody.transform.rotation, targetRot, rotTime);
rigidbody.MoveRotation(rot);
Debug.Log(rotTime);
}
However, the rigidbody rotation seems to reach the target rotation when rotTime ~= .1 but I would expect it to equal 1. Am I doing something wrong/interpreting something wrong?
FWIW I think I can work around it by calculating the current rotation as a percentage of the target rotation, but I’d prefer to just understand Slerp’s t argument rather than trying to hack a solution.