UxrInterpolator.GetInterpolationFactor Method
Gets the T value used for linear interpolations like Vector3.Lerp or Quaternion.Slerp using easing and loop.
Namespace: UltimateXR.Animation.Interpolation
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static float GetInterpolationFactor(
float t,
UxrEasing easing,
UxrLoopMode loopMode = UxrLoopMode.None,
float loopedDuration = -1f
)
Parameters
- t
- Type: System.Single
Value between range [0.0f, 1.0f] - easing
- Type: UltimateXR.Animation.Interpolation.UxrEasing
The interpolation method to use. - loopMode (Optional)
- Type: UltimateXR.Animation.Interpolation.UxrLoopMode
Which looping mode to use. - loopedDuration (Optional)
- Type: System.Single
If loopMode is not LoopMode.None then loopedDuration will specify the duration of the interpolation including all the loops. A negative value will make it loop forever.
Return Value
Type: Single
The t value used to linearly interpolate using the specified parameters
See Also
Reference
UxrInterpolator Class
UltimateXR.Animation.Interpolation Namespace