NWAvatarController

csharp
public class NWAvatarController : MonoBehaviour

Namespace global.

Orchestrates the active local NWAvatar and its runtime runtime full-body IK rig. The controller validates avatar metadata, aligns the authored viewpoint to the XR camera, creates NWFullBodyAvatarRig, and destroys that rig on avatar swaps.

Properties

ActiveAvatar

csharp
public NWAvatar ActiveAvatar { get; }

The local player's avatar, or null.

ActiveRig

csharp
public NWFullBodyAvatarRig ActiveRig { get; }

The IK rig of the local avatar, or null.

HasActiveAvatar

csharp
public bool HasActiveAvatar { get; }

The local player has an avatar and its rig.

IsSeatedMode

csharp
public bool IsSeatedMode { get; }

Seated mode is on.

PlayerController

csharp
public VRPlayerController PlayerController { get; }

The local player's rig.

Methods

SetAvatar

csharp
public bool SetAvatar(NWAvatar avatar)

Puts avatar on the local player: its IK rig, its viewpoint on the camera; false when it cannot be used.

ClearAvatar

csharp
public void ClearAvatar()

Removes the local player's avatar.

SetSeatedMode

csharp
public void SetSeatedMode(bool seated)

Turns seated mode on or off.

AlignActiveAvatarToCameraViewpoint

csharp
public void AlignActiveAvatarToCameraViewpoint()

Moves the avatar so its viewpoint is on the camera.