Scripting / Reference
Players
Types in the ParelVR.Volt.Players namespace.
VoltBone#
ParelVR.Volt.Players.VoltBone enum
A bone of a player's avatar.
Values: Hips, Spine, Chest, Neck, Head, LeftShoulder, LeftUpperArm, LeftLowerArm, LeftHand, RightShoulder, RightUpperArm, RightLowerArm, RightHand, LeftUpperLeg, LeftLowerLeg, LeftFoot, LeftToes, RightUpperLeg, RightLowerLeg, RightFoot, RightToes
VoltFinger#
ParelVR.Volt.Players.VoltFinger enum
A player in the current instance. A script only ever sees what ParelVR chooses to share about a player: never an account, a session or anything that identifies the device.
Values: Thumb, Index, Middle, Ring, Little
VoltGesture#
ParelVR.Volt.Players.VoltGesture enum
A hand shape read from the fingers.
| Value | Meaning |
|---|---|
None (0) |
No shape this list knows, or the fingers are not known. |
Open (1) |
|
Fist (2) |
|
Point (3) |
Index finger out, the rest curled. |
Victory (4) |
Index and middle fingers out. |
ThumbsUp (5) |
|
RockAndRoll (6) |
Index and little fingers out. |
HandGun (7) |
Thumb and index finger out. |
VoltPlayer#
ParelVR.Volt.Players.VoltPlayer class
VoltPlayer properties#
Height of the player's avatar in metres, from the floor to the eyes.
Id of the avatar the player wears, or an empty string when it is not shared.
The name the player shows to others.
Frames per second the player's client is drawing, averaged over about a second. Zero until it is known.
Gravity on the local player as a multiple of normal gravity.
True when the player is standing on something.
True when the player is in VR.
True for the player on this client.
True for the instance master.
True when the player is sitting in a station.
False once the player has left the instance.
Upward speed the local player gets from a jump. Zero disables jumping.
Where a badge goes for this player: just above their nameplate, in world space.
The player's round trip time to the instance server in milliseconds. Zero until it is known.
Number of the player in this instance. Unique while the player is here; reused after they leave.
Where the player stands, in world space.
Which way the player's body faces.
Running speed of the local player in metres per second.
The station the player is sitting in, or null.
How fast the player is moving.
Walking speed of the local player in metres per second.
VoltPlayer methods#
Stops moving this player's badge; the object stays where it is.
A parameter of the player's avatar, such as an expression toggle. Zero when the avatar has no such parameter.
Position of an avatar bone in world space. The player's position when the avatar has no such bone.
Rotation of an avatar bone in world space.
How far a finger of the player's avatar is bent: 0 straight, 1 fully curled. Zero when it is not known.
The hand shape the player is making, read from their avatar's fingers.
Position of the player in world space.
Rotation of the player's body in world space.
A tag the world's scripts gave this player, such as a team or a role. Empty when it has none. Tags are local to this client.
Position of a tracking point in world space. The player's position when the point is not available.
Rotation of a tracking point in world space.
Velocity of the player in world space.
Stops the local player from walking. They can still look around and use the menu.
True when the player owns the object.
True when ParelVR has a position for a tracking point of this player.
Vibrates a controller of the local player. Does nothing on desktop.
Puts this player's voice back to the local player's own settings.
Moves the local player back to a spawn point.
Changes a parameter of the local player's own avatar. False when it has no such parameter or it cannot be written.
Keeps an object of the world just above this player's nameplate, turned toward whoever is looking, until it is cleared, destroyed or the player leaves. One badge per player: a new one replaces the old. Only on this client; call it on every client (for example from OnPlayerJoined) so everyone sees it.
Gives this player a tag on this client; an empty value removes it. Tags are cleared when the player leaves.
Sets the local player's velocity, for launch pads and knock-back.
How far away, in metres, the local player can still hear this player. Only changes what this client hears.
How loud this player's voice is for the local player, 0 (muted) to 1 (normal). Only changes what this client hears.
Moves the local player. Has no effect on another player.
VoltTrackingPoint#
ParelVR.Volt.Players.VoltTrackingPoint enum
A point on a player's body that ParelVR tracks or estimates.
| Value | Meaning |
|---|---|
Head (0) |
|
LeftHand (1) |
|
RightHand (2) |
|
Hip (3) |
|
LeftFoot (4) |
|
RightFoot (5) |
|
Chest (6) |
|
LeftShoulder (7) |
|
RightShoulder (8) |
|
LeftElbow (9) |
|
RightElbow (10) |
|
LeftKnee (11) |
|
RightKnee (12) |
|
Origin (13) |
The floor point under the player: where the avatar stands. |
