RemoteAvatar
La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.
csharp
public class RemoteAvatar : MonoBehaviourNamespace NodeWorld.Avatar.
Another player's avatar in the world: it follows the poses received from the network and carries their voice and nametag.
Properties
PlayerId
csharp
public uint PlayerId { get; }The player's ID in the room.
UserId
csharp
public string UserId { get; }The player's account ID.
DisplayName
csharp
public string DisplayName { get; }The player's name.
Platform
csharp
public string Platform { get; }What the player plays on ("windows", "linux", "android"), empty when unknown.
VoiceTransform
csharp
public Transform VoiceTransform { get; }Where the player's voice comes from: the head, or this object.
Methods
Initialize
csharp
public void Initialize(uint playerId, string userId, string displayName, string platform, RemoteNameplate nameplatePrefab)Sets up the avatar of a player, with its nametag.
SetTargetState
csharp
public void SetTargetState(Vector3 position, Quaternion rotation, Vector3[] bonePositions, Quaternion[] boneRotations)Sets the pose the avatar moves toward: root position and rotation, and the bones' rotations.
FeedVoice
csharp
public void FeedVoice(float[] pcm, int sampleCount)Decoded voice of this player: lights the speaking ring of the nameplate.
