Class BoneFrameSpaceDriver

Namespace
CodeSmile.AnyMotion.AnimateYourself.Spaces
/
Assembly
ApiSource.dll

Space B: writes each bone's rotation directly, with the authored angles expressed in the character's frame rather than in each bone's own local frame.

public sealed class BoneFrameSpaceDriver : IGaitDriverSpace
Expand Details ...
Inheritance
object
BoneFrameSpaceDriver
Implements

Remarks

This is the space that solves R2's actual problem. Bone local axes are chosen by whoever authored the model, so "bend the elbow 30°" is a different local-axis operation on every rig. Conjugating the rotation through the character's frame removes that difference with no per-rig configuration and no reliance on Mecanim.

Root-of-limb and torso bones take character-space rotations, because their orientation is meaningful relative to the body as a whole. Hinge joints — knee, elbow, ankle — take parent-space rotations, because a knee bends relative to the thigh above it, whichever way the thigh happens to be pointing.

Properties: composes with Animation Rigging, because it writes plain Transforms before the rigging constraints evaluate; supports masking, because each bone is written independently; cannot place a foot at a chosen point, because it has no notion of where the end of the chain lands.

Properties

BindError

Reason Bind(Animator, RigMetrics, BindPose) failed, or null.

public string BindError { get; }

Property Value

string

DisplayName

Short label for the comparison table.

public string DisplayName { get; }

Property Value

string

Kind

public GaitDriverSpaceKind Kind { get; }

Property Value

GaitDriverSpaceKind

SupportsAnimationRigging

False when this space overwrites whatever Animation Rigging produced, making the two mutually exclusive.

public bool SupportsAnimationRigging { get; }

Property Value

bool

SupportsLimbTargets

False when the space cannot place a hand or foot at a chosen point, which R10 requires.

public bool SupportsLimbTargets { get; }

Property Value

bool

SupportsMasking

False when the space can only write the whole body, so partial-body jank is impossible.

public bool SupportsMasking { get; }

Property Value

bool

Methods

Apply(in GaitPose, float)

Writes the pose to the rig. weight blends between the bind pose at 0 and the full gait at 1, which the distance LOD tiers of R4 need in order to fade a tier in and out rather than switch it.

public void Apply(in GaitPose pose, float weight)

Parameters

Type Name Description
GaitPose
pose
float
weight

Bind(Animator, RigMetrics, BindPose)

Prepares the space for one rig. Returns false and sets BindError on failure.

public bool Bind(Animator animator, RigMetrics metrics, BindPose bindPose)

Parameters

Type Name Description
Animator
animator
RigMetrics
metrics
BindPose
bindPose

Reference pose to restore to before each write, resolved once by the caller so that all spaces share it. Never read this from the live Transforms: doing so lets an animated pose become the reference, after which rotations stack on a pose that already contains a frame of gait.

Returns

bool

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()