ComputeLocalToParentLinearVelocities
Computes the linear velocity of each bone in LocalToParent space, from two consecutive streams of the same rig.
Read time 1 minuteLast updated 4 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
ComputeLocalToParentLinearVelocities(AnimationStream, AnimationStream, float, NativeArray<float3>)
public static void ComputeLocalToParentLinearVelocities(ref AnimationStream input, ref AnimationStream previousInput, float deltaTime, NativeArray<float3> outVelocities)
Parameters
The stream for the current update.
The stream for the previous update. It must use the same rig as .
inputTime between the two streams, in seconds. It must be greater than zero.
Receives the velocity of each bone, in units per second. The length must be equal to the bone count of the rig.
Remarks
The velocity of a bone is the change of its translation between the two streams, divided by the elapsed time. Element j of the output belongs to the bone with index j.
LocalToParent