ParelVRDocs
Player site

Scripting / Reference

Interaction

Types in the ParelVR.Volt.Interaction namespace.

VoltHand#

ParelVR.Volt.Interaction.VoltHand enum

Which hand holds something.

Values: None, Left, Right

VoltInteractable#

ParelVR.Volt.Interaction.VoltInteractable component extends VoltSceneComponent

Makes an object usable: players see a prompt when they point at it and the behaviours on the object get OnInteract when they use it.

VoltInteractable properties#

bool Interactable { get; set; }

Whether players can use the object right now.

string InteractionText { get; set; }

Text shown to the player who points at the object.

float Proximity { get; set; }

How close a player has to be, in metres.

VoltPickup#

ParelVR.Volt.Interaction.VoltPickup component extends VoltSceneComponent

Makes an object something players can pick up and carry. Add a VoltObjectSync as well so everyone sees where it goes.

VoltPickup properties#

VoltHand HeldHand { get; }

The hand that holds the object.

VoltPlayer Holder { get; }

The player who holds the object, or null.

string InteractionText { get; set; }

Text shown to the player who points at the object.

bool IsHeld { get; }

True while a player holds the object.

bool Pickupable { get; set; }

Whether players can pick the object up.

VoltPickup methods#

void Drop()

Makes the local player let go of the object.

VoltStation#

ParelVR.Volt.Interaction.VoltStation component extends VoltSceneComponent

A seat. A player who uses it sits at the station's position until they leave.

VoltStation properties#

bool IsOccupied { get; }

True while a player sits in the station.

VoltPlayer Occupant { get; }

The player in the station, or null.

VoltStation methods#

void ExitStation()

Makes the local player leave the station.

void UseStation()

Seats the local player in the station.

VoltStationMobility#

ParelVR.Volt.Interaction.VoltStationMobility enum

How a player can leave a station.

Value Meaning
Immobilize (0) The player cannot move while seated and leaves by moving or jumping.
ImmobilizeForVehicle (1) The player stays seated until a script calls ExitStation.
Mobile (2) The player can walk while attached to the station.