NWFullBodyAvatarRig
La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.
public class NWFullBodyAvatarRig : MonoBehaviourNamespace global.
Runtime full-body IK rig for the local NodeWorld avatar. NodeWorld owns target generation and visibility; FullBodyVrIkComponent is the only component that solves humanoid bones. Each frame the locomotion clips pose the body first (idle, walk, run, as in VRChat; the sitting pose when the world seats the player), then the IK puts the head and the tracked hands on their targets.
Properties
IsInitialized
public bool IsInitialized { get; }Initialize ran and Dispose did not.
HasSolvedPose
public bool HasSolvedPose { get; }The IK has solved a pose at least once.
IsSolverReady
public bool IsSolverReady { get; }The IK component is ready to solve.
SolverComponent
public Component SolverComponent { get; }The IK component of the avatar.
TargetRoot
public Transform TargetRoot { get; }The parent of the IK targets.
HeadTarget
public Transform HeadTarget { get; }The head target, on the camera.
LeftHandTarget
public Transform LeftHandTarget { get; }The left hand target, on the left controller.
RightHandTarget
public Transform RightHandTarget { get; }The right hand target, on the right controller.
HeadTrackingOffset
public Vector3 HeadTrackingOffset { get; }From the eyes (camera) to the head bone, in camera space: where the head target sits.
SittingEyeOffset
public Vector3 SittingEyeOffset { get; }The eyes in the sitting pose, from the point the avatar sits on, in that point's space (m): FL# Player.sittingEyeOffset.
LeftHandPositionOffset
public Vector3 LeftHandPositionOffset { get; }From the left controller to the left hand bone, in the controller's space.
RightHandPositionOffset
public Vector3 RightHandPositionOffset { get; }From the right controller to the right hand bone, in the controller's space.
Methods
BeginThirdPersonRender
public void BeginThirdPersonRender()For one render of another camera (a mirror): the local avatar is drawn as the other players see it, head included. Its shadow double, which keeps the head, renders normally and the first-person avatar (head scaled to zero) is hidden. Call EndThirdPersonRender after the render.
EndThirdPersonRender
public void EndThirdPersonRender()Ends what BeginThirdPersonRender started.
SetHandsTracked
public void SetHandsTracked(bool left, bool right)Which hands the IK puts on their controllers. An untracked hand follows the animation (desktop, as in VRChat). The switch blends over a moment.
ControllerPoseAtHand
public Pose ControllerPoseAtHand(bool left, Vector3 controllerScale)Where a controller of the given scale must be for the IK to put the avatar's hand where it is now (last solved pose): an untracked hand's controller follows the hand this way.
Initialize
public void Initialize(NWAvatar avatar, VRPlayerController playerController, Transform headVRTarget, Transform leftHandVRTarget, Transform rightHandVRTarget, Vector3 leftHandPositionOffset, Vector3 rightHandPositionOffset, LocomotionClipSet locomotionClips)Puts the avatar on the player's rig: its IK targets on the camera and controllers, its first-person view and its shadow double.
Dispose
public void Dispose()Removes the IK and the targets from the avatar.
