Animation Blending Modes
You may have already noticed that in the basic animation syntax introduced in the first section, there is still one parameter left unexplained:
[offset] + [duration] / object.MQuad(x => x.member, startValue, endValue) - [blendingMode];
The final blendingMode
parameter. By default, the animation blending mode is set to Default
.
Additive Blending Mode
When using this blending mode, the animation's start and end values will be added on top of the current property value of the target object during playback.
For example: if the ball’s current position is (2,3,3)
, and you apply an animation from (0,0,0)
to (6,6,6)
:
-
Under the default
Default
blending mode, the ball will move from(0,0,0)
to(6,6,6)
. -
But when using
Additive
blending mode, the ball will move from(2,3,3)
to(8,9,9)
.
Here's how it looks using the default blending mode:
0.5f / ball.MQuad(x => x.position, Vector3.zero, Vector3.one * 6f);
And here's the Additive
blending mode version:
0.5f / ball.MQuad(x => x.position, Vector3.zero, Vector3.one * 6f) - BlendingMode.Additive;
- Animations using the
Additive
blending mode must have a defined start value. - When resetting, animations with
Additive
blending can only revert to the recorded property values at the initial playback time, ignoring the animator’s reset mode settings.