SkeletonPart

csharp
public sealed class SkeletonPart : BodyPart

Namespace NodeWorld.Avatar.IK.

The spine of the solver: pelvis, spine, chest, neck and head, driven by the head and pelvis targets.

Properties

PelvisReadPosition

csharp
public Vector3 PelvisReadPosition { get; }

The pelvis position read from the avatar this frame.

HeadPosition

csharp
public Vector3 HeadPosition { get; }

The solved head position.

IKRotationHead

csharp
public Quaternion IKRotationHead { get; }

The rotation of the head target this frame.

AnchorRelativeToHead

csharp
public Quaternion AnchorRelativeToHead { get; }

The rotation of the headset anchor relative to the head.

RootHeadingOffset

csharp
public float RootHeadingOffset { get; }

The root heading offset of SpineSettings, in degrees.

MaxRootAngle

csharp
public float MaxRootAngle { get; set; }

Largest angle between the root's heading and the head's, in degrees.

Methods

CreateSpine

csharp
public static SkeletonPart CreateSpine(HumanoidReferences references, PoseSample[] read, bool hasLegs)

The spine part of an avatar's references.

Read

csharp
public void Read(PoseSample[] read, bool hasLegs, int rootIndex, int pelvisRootIndex)

Reads the spine bones from read.

Reset

csharp
public void Reset(PoseSample[] read)

Resets the spine to the read pose.

PreSolve

csharp
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

csharp
public void ApplyOffsets(SpineSettings settings, float scale)

Adds the runtime offsets of SpineSettings to the solved spine.

Solve

csharp
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

csharp
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

csharp
public void ResetOffsets(SpineSettings settings)

Clears the runtime offsets of SpineSettings.

Write

csharp
public void Write(PoseSample[] solved)

Writes the solved spine into solved.

RotateFacing

csharp
public void RotateFacing(Quaternion deltaRotation)

Turns the direction the body faces by deltaRotation.