public sealed class BoneMaskHow much of a layer reaches each joint: a weight per joint, and the way a wave is played on the arm of a character who is still running.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
A weight and not a flag. A boolean mask puts a hard seam at the joint where it changes — the spine below it is running and the spine above it is waving, and the two disagree by however much the clips do. A weight lets the seam be spread over three or four joints, which is what makes the transition read as a body rather than as two halves of one.
Built by name, applied by index. Authoring says "the upper body", which means a joint and everything under it; a frame reads an array. The translation happens once, in Builder, against the skeleton the mask is for — so a mask cannot be applied to the wrong skeleton, and a joint name that no longer exists is caught where the mask is built rather than by a limb that quietly stops moving.
Fields and properties (3)
public Skeleton SkeletonThe skeleton this mask is indexed against.
public ReadOnlySpan<float> WeightsThe per-joint weights, in joint order.
public float this[int joint]How much of the layer reaches one joint.
Methods (3)
public static BoneMask Full(Skeleton skeleton)A mask that passes everything.
public static BoneMask.Builder Excluding(Skeleton skeleton)Starts building a mask that passes nothing, to add joints to.
public static BoneMask.Builder Including(Skeleton skeleton)Starts building a mask that passes everything, to take joints out of.
Used by (9)
- AnimationLayerVixen.Animation
- AnimatorTestsVixen.Animation.Tests
- BuilderVixen.Animation
- LoadPathTestsVixen.Animation.Tests
- PoseBlendVixen.Animation
- PoseBlendTestsVixen.Animation.Tests
- TransitionRuleRecordVixen.Animation
- TransitionSpecVixen.Animation
- AnimationGraphCompilerVixen.Editor.AnimationGraph