LerpRotation
Calculate the normalized linear interpolation of this rotation and the specified rotation using the specified interval.
Read time 1 minuteLast updated 10 days ago
Definition
- Type: Method
- Namespace: Unity.U2D.Physics
- Assembly: UnityEngine.PhysicsCore2DModule
LerpRotation(PhysicsRotate, float)
Calculate the normalized linear interpolation of this rotation and the specified rotation using the specified interval.
public readonly PhysicsRotate LerpRotation(PhysicsRotate rotation, float interval)
Parameters
The rotation to lerp with against the current rotation.
The lerp interval, typically in the range [0, 1]. A value outside of this range performs normalized linear extrapolation.
Returns
Type | Description |
|---|---|
| PhysicsRotate | The normalized linear interpolation/extrapolation. |
LerpRotation(PhysicsRotate, PhysicsRotate, float)
Calculate the normalized linear interpolation between two rotations using the specified fraction.
public static PhysicsRotate LerpRotation(PhysicsRotate rotationA, PhysicsRotate rotationB, float interval)
Parameters
The rotation to lerp from.
The rotation to lerp to.
The lerp interval, typically in the range [0, 1]. A value outside of this range performs normalized linear extrapolation.
Returns
Type | Description |
|---|---|
| PhysicsRotate | The normalized linear interpolation/extrapolation. |