Vixen
02b45cc4
csharp
public sealed class AnimationLayer

One state machine, a weight and a mask: the unit a character's animation is composed out of.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

The base layer is layer 0 and is what everything else is applied over. Its mask is ignored — there is nothing underneath for a masked-out joint to fall back to, and a partially-masked base layer produces joints in the bind pose, which reads as a character with a broken arm rather than as an authoring mistake.

Root motion comes from one layer. Two layers both claiming to move the character would move it twice, and averaging them by weight gives a character that walks at half speed whenever an upper-body layer fades in. ContributesRootMotion says which one owns it; by default that is the base layer and no other.

Fields and properties (7)

  • public string Name

    What the layer is called.

  • public StateMachineInstance States

    Where in its graph this character is.

  • public float Weight

    How much of it reaches the result, in [0, 1].

  • public BoneMask? Mask

    Which joints it reaches, or for all of them.

  • public LayerBlend Blend

    How it mixes with what is underneath.

  • public bool ContributesRootMotion

    Whether this layer's root motion is the character's.

  • public bool Enabled

    Whether it is evaluated at all.

Methods (1)

Used by (8)

  • AnimatorVixen.Animation
  • AnimatorTestsVixen.Animation.Tests
  • NetworkAnimatorApplySystemVixen.Net.Animation
  • NetworkAnimatorCaptureSystemVixen.Net.Animation
  • NetworkAnimatorTestsVixen.Net.Animation.Tests
  • AnimationGraphArtefactVixen.Editor.AnimationGraph
  • AnimationGraphCompilerVixen.Editor.AnimationGraph
  • AnimationGraphTestsVixen.Editor.AnimationGraph.Tests