Add(ref AnimationStream, in AnimationStream, float)
Adds a weighted animation stream to the mix.
Read time 1 minuteLast updated 4 hours ago
Definition
- Type: Method
- Namespace: Unity.Animations
- Assembly: UnityEngine.AnimationCoreModule
Add(AnimationStream, AnimationStream, float)
public void Add(ref AnimationStream output, in AnimationStream add, float weight)
Parameters
The stream that accumulates the mixed result. Use the same stream as in the call to Core.PoseMixer.Begin.
The stream to add to the mix. It must use the same rig as .
outputThe weight of the stream in the mix. The mixer doesn't normalize weights.
Remarks
The method scales each continuous channel by and adds it to the output stream. Rotations are scaled and summed the same way, and normalizes them. The discrete channels, such as integers and entity IDs, come from the stream with the greatest weight. The default pose that adds takes part in this choice. Its weight is 1 minus the sum of all weights. For example, with the weights 0.1, 0.2, and 0.3, the default pose has the weight 0.4, so its discrete channels are used. If several streams have the same greatest weight, the stream that you added first is used.
weightEndEnd