SkeletonPart
public sealed class SkeletonPart : BodyPartNamespace NodeWorld.Avatar.IK.
The spine of the solver: pelvis, spine, chest, neck and head, driven by the head and pelvis targets.
Properties
PelvisReadPosition
public Vector3 PelvisReadPosition { get; }The pelvis position read from the avatar this frame.
HeadPosition
public Vector3 HeadPosition { get; }The solved head position.
IKRotationHead
public Quaternion IKRotationHead { get; }The rotation of the head target this frame.
AnchorRelativeToHead
public Quaternion AnchorRelativeToHead { get; }The rotation of the headset anchor relative to the head.
RootHeadingOffset
public float RootHeadingOffset { get; }The root heading offset of SpineSettings, in degrees.
MaxRootAngle
public float MaxRootAngle { get; set; }Largest angle between the root's heading and the head's, in degrees.
Methods
CreateSpine
public static SkeletonPart CreateSpine(HumanoidReferences references, PoseSample[] read, bool hasLegs)The spine part of an avatar's references.
Read
public void Read(PoseSample[] read, bool hasLegs, int rootIndex, int pelvisRootIndex)Reads the spine bones from read.
Reset
public void Reset(PoseSample[] read)Resets the spine to the read pose.
PreSolve
public void PreSolve(SpineSettings settings, Transform headTarget, Transform pelvisTarget, Transform chestGoal, float scale)Prepares the head, pelvis and chest goals of this frame from the targets.
ApplyOffsets
public void ApplyOffsets(SpineSettings settings, float scale)Adds the runtime offsets of SpineSettings to the solved spine.
Solve
public void Solve(SpineSettings settings, Animator animator, VirtualBone rootBone, LimbPart[] legs, LimbPart[] arms, float scale)Solves the spine toward the head and pelvis targets, with the legs and arms.
InverseTranslateToHead
public void InverseTranslateToHead(LimbPart[] legs, bool limited, bool useCurrentLegMagnitude, Vector3 offset, float weight)Moves the body so the head reaches its target, within what the legs allow.
ResetOffsets
public void ResetOffsets(SpineSettings settings)Clears the runtime offsets of SpineSettings.
Write
public void Write(PoseSample[] solved)Writes the solved spine into solved.
RotateFacing
public void RotateFacing(Quaternion deltaRotation)Turns the direction the body faces by deltaRotation.
