Players
public static class PlayersNamespace 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
public static int count { get; }The number of other players in the room (on the server: every player).
ids
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
public static VoiceSettings defaultVoice { get; }The default voice settings of the client.
Methods
Get
public static PlayerInfo Get(int index)Another player of the room by index, 0 to count - 1: its id, name and pose.
Exists
public static bool Exists(int playerId)The player is in the room.
GetName
public static string GetName(int playerId)Display name of a player of the room (null if not there).
GetAccountId
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
public static Vector3 GetPosition(int playerId)Position of a player of the room, in the world.
GetRotation
public static Quaternion GetRotation(int playerId)Rotation of a player of the room (identity if not there).
GetVelocity
public static Vector3 GetVelocity(int playerId)Velocity of a player of the room.
GetBonePosition
public static Vector3 GetBonePosition(int playerId, Bone bone)A bone of a player's avatar, in the world; zero without an avatar.
GetBoneRotation
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
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
public static Quaternion GetTrackingRotation(int playerId, TrackingPoint point)Rotation of a tracked point of a player (identity if there is none).
IsMaster
public static bool IsMaster(int playerId)The player is the master of the room.
GetJoinOrder
public static int GetJoinOrder(int playerId)The order the player entered the room in (0: the first still there), -1 if not there.
SetVoice
public static void SetVoice(int playerId, VoiceSettings settings)How the local player hears that player (the room's defaults until set).
ResetVoice
public static void ResetVoice(int playerId)Back to the room's defaults for hearing that player.
GetVoice
public static VoiceSettings GetVoice(int playerId)The voice settings set for that player by the scripts of this world (the defaults if none).
SetVoiceNear
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
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
public static void SetVoiceGain(int playerId, float gainDb)Changes only the gain, in dB, of that player's voice for the local player.
SetVoiceVolumetricRadius
public static void SetVoiceVolumetricRadius(int playerId, float radius)Changes only the radius (m) of that player's voice source.
SetVoiceLowpass
public static void SetVoiceLowpass(int playerId, bool lowpass)Changes only whether that player's voice is muffled far away.
SetAvatarAudible
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.
