FullBodyVrSolver
public sealed class FullBodyVrSolverNamespace NodeWorld.Avatar.IK.
Full-body IK for VR: places the avatar's head, hands, pelvis and feet on the player's headset, controllers and trackers, and steps the feet when no foot is tracked.
Fields
weight
public float weightHow much the IK is applied (0 to 1); 0 skips it.
quality
public int qualitySolver quality (0 to 2): 0 is the cheapest, 2 reads the animated pose each frame.
avatarScale
public float avatarScaleThe avatar's scale relative to the player, set by calibration.
plantFeet
public bool plantFeetThe feet stay where they stepped while the body moves.
headTarget
public Transform headTargetThe head target (the headset).
leftHandTarget
public Transform leftHandTargetThe left hand target (the left controller).
rightHandTarget
public Transform rightHandTargetThe right hand target (the right controller).
pelvisTarget
public Transform pelvisTargetThe pelvis target (a tracker), or null.
leftFootTarget
public Transform leftFootTargetThe left foot target (a tracker), or null for procedural steps.
rightFootTarget
public Transform rightFootTargetThe right foot target (a tracker), or null for procedural steps.
animator
public Animator animatorThe avatar's Animator.
spine
public SpineSettings spineSettings of the spine.
leftArm
public ArmSettings leftArmSettings of the left arm.
rightArm
public ArmSettings rightArmSettings of the right arm.
leftLeg
public LegSettings leftLegSettings of the left leg.
rightLeg
public LegSettings rightLegSettings of the right leg.
locomotion
public LocomotionSettings locomotionSettings of the procedural steps.
Properties
Initialized
public bool Initialized { get; }Initialize was called and Dispose was not.
RootBone
public VirtualBone RootBone { get; }The root bone of the solver.
SpinePart
public SkeletonPart SpinePart { get; }The spine part of the solver.
ReadRootRotation
public Quaternion ReadRootRotation { get; }The root's rotation read from the avatar this frame.
Methods
Initialize
public void Initialize(HumanoidReferences references)Prepares the solver for the bones of references; throws if they are not valid.
Dispose
public void Dispose()Stops the solver and clears its events.
Update
public void Update(float deltaTime)Solves the body for this frame.
ResetRuntimeState
public void ResetRuntimeState()Reads the avatar's current pose and restarts the solver from it (after a teleport).
AddPositionOffset
public void AddPositionOffset(BodyPositionOffset target, Vector3 value)Adds value to the position offset of a body part for this frame.
AddRotationOffset
public void AddRotationOffset(BodyRotationOffset target, Quaternion value)Adds value to the rotation offset of a body part for this frame.
AddPlatformMotion
public void AddPlatformMotion(Vector3 deltaPosition, Quaternion deltaRotation, Vector3 pivot)Moves the planted feet with a moving platform the player stands on.
FixTransformsToDefaultLocalState
public void FixTransformsToDefaultLocalState()Puts the bones back to their default local pose before the animator runs (quality below 2).
Events
BeforeSolve
public event Action BeforeSolveRaised before each solve.
AfterSolve
public event Action AfterSolveRaised after each solve.
