Scripting / Reference
Objects
Types in the ParelVR.Volt.Objects namespace.
VoltCollider#
ParelVR.Volt.Objects.VoltCollider reference extends VoltComponent
A collider of any shape.
VoltCollider properties#
Centre of the collider's bounding box in world space.
Size of the collider's bounding box in world space.
Whether the collider takes part in physics.
Whether the collider is a trigger: it reports overlaps instead of blocking.
The rigidbody the collider belongs to, if any.
VoltCollider methods#
The point on the collider closest to a position.
VoltComponent#
ParelVR.Volt.Objects.VoltComponent reference extends VoltObject
Base of the references to components.
VoltComponent properties#
The object the component is on.
The transform of the object the component is on.
VoltComponent methods#
Finds another component, or a behaviour, on the same object.
VoltForceMode#
ParelVR.Volt.Objects.VoltForceMode enum
How a force is applied to a rigidbody.
| Value | Meaning |
|---|---|
Force (0) |
A continuous force that takes mass into account. |
Impulse (1) |
An instant push that takes mass into account. |
VelocityChange (2) |
An instant change of velocity that ignores mass. |
Acceleration (5) |
A continuous acceleration that ignores mass. |
VoltGameObject#
ParelVR.Volt.Objects.VoltGameObject reference extends VoltObject
An object in the world scene.
VoltGameObject properties#
Whether the object and all of its parents are switched on.
Whether the object itself is switched on.
The layer the object is on, 0 to 31.
The stable id of the object in this world, or 0 when it was created while the world was running.
The object's tag.
The object's transform.
VoltGameObject methods#
True when the object has the given tag.
Finds a component, or a behaviour, on this object or any of its children.
Finds a component, or a behaviour, on this object or any of its parents.
Finds a component, or a behaviour, on this object. Returns null when there is none.
Every component of a type on this object and its children.
Switches the object on or off.
VoltLight#
ParelVR.Volt.Objects.VoltLight reference extends VoltComponent
A light.
VoltLight properties#
Colour of the light.
Whether the light is on.
Brightness of the light.
How far the light reaches, for point and spot lights.
Cone angle of a spot light in degrees.
VoltObject#
ParelVR.Volt.Objects.VoltObject reference
Base of the references a script can hold to things in the world scene. A reference only ever points at an object that belongs to the world; anything else reads as null.
VoltObject properties#
False once the object has been destroyed.
The name of the object.
Operators and conversions: 1 available.
VoltObjectReference#
ParelVR.Volt.Objects.VoltObjectReference class
The stable id of a scene object. It is the same for every player and survives a rebuild of the world, so it is what to put in synced fields, network events and storage when a script needs to name an object.
VoltObjectReference properties#
The id as text. Empty for an object that was created while the world was running.
True when the id names an object that exists in this world right now.
VoltObjectReference methods#
Rebuilds a reference from the text of its id. Returns null when the text is not an id of this world.
The object the id names, or null when it no longer exists.
VoltRenderer#
ParelVR.Volt.Objects.VoltRenderer reference extends VoltComponent
Something that draws: a mesh, a skinned mesh, a line, a trail.
VoltRenderer properties#
Whether the renderer draws.
True while any camera can see the renderer.
Number of material slots.
VoltRenderer methods#
Removes every property this script set, back to the material's own values.
Reads a colour property.
Reads a number property.
Reads a texture property: what this renderer was given, or the material's own texture. Null when there is none.
Sets the weight of a blend shape on a skinned mesh, 0 to 100.
Sets a colour property of this renderer only, for example "_EmissionColor".
Sets the main colour of this renderer only.
Sets a number property of this renderer only.
Puts a texture into the main texture of this renderer only (_MainTex and _BaseMap).
Puts a texture into a texture property of this renderer only, for example "_MainTex", "_BaseMap" or "_EmissionMap": a render texture a camera draws into, or any texture of the world. Null gives the property back to the material.
Sets a vector property of this renderer only.
VoltRigidbody#
ParelVR.Volt.Objects.VoltRigidbody reference extends VoltComponent
A physics body.
VoltRigidbody properties#
Angular velocity in radians per second.
A kinematic body is moved by scripts and animation only, not by forces.
Mass in kilograms.
Position of the body in world space.
Rotation of the body in world space.
Whether gravity acts on the body.
Velocity in metres per second.
VoltRigidbody methods#
Pushes the body.
Pushes the body at a point, which also makes it spin.
Spins the body.
Moves a kinematic body to a position, colliding along the way.
Turns a kinematic body to a rotation.
Puts the body to sleep until something touches it.
Wakes the body up.
VoltSceneComponent#
ParelVR.Volt.Objects.VoltSceneComponent component
Base of the components ParelVR adds to Unity for worlds, such as VoltPickup and VoltStation. A script can hold one in a field and assign it in the inspector like any other component.
VoltSceneComponent properties#
Whether the component is switched on.
The object the component is on.
The transform of the object the component is on.
VoltTransform#
ParelVR.Volt.Objects.VoltTransform reference extends VoltComponent
Position, rotation and scale of an object, and its place in the hierarchy.
VoltTransform properties#
Number of direct children.
Rotation in world space as Euler angles in degrees.
The blue axis of the object in world space.
Rotation relative to the parent as Euler angles in degrees.
Position relative to the parent.
Rotation relative to the parent.
Scale relative to the parent.
Scale in world space. Read-only.
The parent transform, or null at the top of the hierarchy or when the parent is outside the world.
Position in world space.
The red axis of the object in world space.
Rotation in world space.
The green axis of the object in world space.
VoltTransform methods#
Finds a child by name or by a path such as "Arm/Hand".
The child at an index.
Converts a direction from world space to the object's space.
Converts a position from world space to the object's space.
True when this transform is somewhere below another one.
Turns the object so its forward axis points at a position.
Turns the object by Euler angles in degrees, in its own space.
Turns the object around an axis through a point in world space.
Puts the object under another transform. Pass null to move it to the top of the world's hierarchy.
Sets position and rotation in one call.
Converts a direction from the object's space to world space.
Converts a position from the object's space to world space.
Moves the object by an offset in its own space.
