Slerp
"Slerp" is shorthand for for Spherical Linear Interpolation. This command provides a way to smoothly interpolate between two arbitrary quaternion rotations. This provides accurate results when dealing with rotations on multiple axes.
Syntax
- Quat Slerp(Quat target,number distance)
Parameters
- target: the target rotation.
- mix: the amount to interpolate towards the target rotation. If mix is zero, this quaternion will be returned. If mix is one, the target rotation will be returned. If mix is equal to 0.5, a quaternion rotation that is halfway between the two rotations will be returned.
Returns
This is an advanced command that is only needed in very special situations. If you're looking for an easy way to smoothly rotate an object, see Entity::Turn or Entity::AlignToVector.