NodeWorld

Players

La référence est en anglais : elle est générée à partir des commentaires du code, écrits en anglais.

csharp
public static class Players

Namespace NodeWorld.Flux.

The players of the room. Get / count: the other players (the local player is Player). By id: any player, the local one included. OnPlayerJoined / OnPlayerLeft tell the changes.

Properties

count

csharp
public static int count { get; }

The number of other players in the room (on the server: every player).

ids

csharp
public static int[] ids { get; }

The ids of every player of the room, the local player included, in the order they entered (the master first).

defaultVoice

csharp
public static VoiceSettings defaultVoice { get; }

The default voice settings of the client.

Methods

Get

csharp
public static PlayerInfo Get(int index)

Another player of the room by index, 0 to count - 1: its id, name and pose.

Exists

csharp
public static bool Exists(int playerId)

The player is in the room.

GetName

csharp
public static string GetName(int playerId)

Display name of a player of the room (null if not there).

GetAccountId

csharp
public static string GetAccountId(int playerId)

The NodeWorld account of the player: the same in every room and every visit (null if not there).

GetPosition

csharp
public static Vector3 GetPosition(int playerId)

Position of a player of the room, in the world.

GetRotation

csharp
public static Quaternion GetRotation(int playerId)

Rotation of a player of the room (identity if not there).

GetVelocity

csharp
public static Vector3 GetVelocity(int playerId)

Velocity of a player of the room.

GetBonePosition

csharp
public static Vector3 GetBonePosition(int playerId, Bone bone)

A bone of a player's avatar, in the world; zero without an avatar.

GetBoneRotation

csharp
public static Quaternion GetBoneRotation(int playerId, Bone bone)

Rotation of a bone of a player's avatar, in the world (identity if there is none).

GetTrackingPosition

csharp
public static Vector3 GetTrackingPosition(int playerId, TrackingPoint point)

Position of a tracked point of a player: its head, a hand, or the origin of its play space.

GetTrackingRotation

csharp
public static Quaternion GetTrackingRotation(int playerId, TrackingPoint point)

Rotation of a tracked point of a player (identity if there is none).

IsMaster

csharp
public static bool IsMaster(int playerId)

The player is the master of the room.

GetJoinOrder

csharp
public static int GetJoinOrder(int playerId)

The order the player entered the room in (0: the first still there), -1 if not there.

SetVoice

csharp
public static void SetVoice(int playerId, VoiceSettings settings)

How the local player hears that player (the room's defaults until set).

ResetVoice

csharp
public static void ResetVoice(int playerId)

Back to the room's defaults for hearing that player.

GetVoice

csharp
public static VoiceSettings GetVoice(int playerId)

The voice settings set for that player by the scripts of this world (the defaults if none).

SetVoiceNear

csharp
public static void SetVoiceNear(int playerId, float near)

Changes only near: the distance (m) up to which the local player hears that player's voice at full volume.

SetVoiceFar

csharp
public static void SetVoiceFar(int playerId, float far)

Changes only far: the distance (m) beyond which the local player no longer hears that player's voice.

SetVoiceGain

csharp
public static void SetVoiceGain(int playerId, float gainDb)

Changes only the gain, in dB, of that player's voice for the local player.

SetVoiceVolumetricRadius

csharp
public static void SetVoiceVolumetricRadius(int playerId, float radius)

Changes only the radius (m) of that player's voice source.

SetVoiceLowpass

csharp
public static void SetVoiceLowpass(int playerId, bool lowpass)

Changes only whether that player's voice is muffled far away.

SetAvatarAudible

csharp
public static void SetAvatarAudible(int playerId, bool audible)

Whether the local player hears the sounds of that player's avatar (its AudioSources). Back to audible when the world unloads.