Interface vrspaces
VR spaces.
See also documentation of the onVRFrame() engine handler.
Type vrspaces
| vrspaces.actionSpaces |
Table of existing ${#ActionSpace}. |
| vrspaces.createDerviedSpace(name, reference, pose) |
Create a derived space. |
| vrspaces.customSpaces |
Table of existing custom spaces |
| vrspaces.isActionSpace(name) |
Check if the given string is the name of an action space |
| vrspaces.isActionSpaceSupported(name) |
Check if an action space is supported |
| vrspaces.isReferenceSpace(name) |
Check if the given string is the name of a reference space |
| vrspaces.isReferenceSpaceSupported(name) |
Check if a reference space is supported. |
| vrspaces.isSpace(name) |
Check if the given string is the name of a space |
| vrspaces.isSpaceActive(name) |
Check if the given string is the name of a space that is currently active. |
| vrspaces.locateSpace(name, reference) |
Locate a space in relative terms. |
| vrspaces.locateSpaceInWorld(name) |
Locate a space in the game world. |
| vrspaces.recenterXY() |
Request a horizontal recenter |
| vrspaces.recenterZ() |
Request a vertical recenter. |
| vrspaces.referenceSpaces |
Table of ${#ReferenceSpace}. |
| vrspaces.unitsPerMeter |
Constant used to convert between MW units and meters |
| vrspaces.version |
Interface version |
Type ActionSpace
| ActionSpace.LeftHandAim |
/user/hand/left/input/aim/pose |
| ActionSpace.LeftHandGrip |
/user/hand/left/input/grip/pose |
| ActionSpace.LeftHandPalm |
/user/hand/left/input/palm_ext/pose |
| ActionSpace.LeftHandPinch |
/user/hand/left/input/pinch_ext/pose |
| ActionSpace.LeftHandPoke |
/user/hand/left/input/poke_ext/pose |
| ActionSpace.RightHandAim |
/user/hand/right/input/aim/pose |
| ActionSpace.RightHandGrip |
/user/hand/right/input/grip/pose |
| ActionSpace.RightHandPalm |
/user/hand/right/input/palm_ext/pose |
| ActionSpace.RightHandPinch |
/user/hand/right/input/pinch_ext/pose |
| ActionSpace.RightHandPoke |
/user/hand/right/input/poke_ext/pose |
Type Pose
Type ReferenceSpace
| ReferenceSpace.Local |
Provides a gravity-locked origin around the initial position of the headest. |
| ReferenceSpace.Stage |
A gravity-locked, stable stage defined by the implementation. May not be available, so check its availability before use. |
| ReferenceSpace.View |
The origin is the HMD itself, and will be constantly moving with the player. |
Type vrspaces
Field(s)
- #table vrspaces.actionSpaces
-
Table of existing ${#ActionSpace}.
*Aim and *Grip spaces will always be supported, but *Palm, *Pinch, and *Poke may not be depending on the VR runtime. Always check if these are supported before trying to use them.
- vrspaces.createDerviedSpace(name, reference, pose)
-
Create a derived space.
A derived space is a space with some fixed offset from a given space.
Parameters
-
#string name: The name to give the derived space. If not unique, will override the existing derived space. Can not be used to override reference spaces or action spaces. -
#string reference: The name of the space to derive from. Reference may itself be a derived space. -
#Pose pose: The offset from the reference.
-
- #table vrspaces.customSpaces
-
Table of existing custom spaces
- vrspaces.isActionSpace(name)
-
Check if the given string is the name of an action space
Parameter
-
#string name:
-
- vrspaces.isActionSpaceSupported(name)
-
Check if an action space is supported
Parameter
-
#ActionSpace name: The name of the action space
-
- vrspaces.isReferenceSpace(name)
-
Check if the given string is the name of a reference space
Parameter
-
#string name:
-
- vrspaces.isReferenceSpaceSupported(name)
-
Check if a reference space is supported.
Parameter
-
#ReferenceSpace name: The name of the reference space
-
- vrspaces.isSpace(name)
-
Check if the given string is the name of a space
Parameter
-
#string name:
-
- vrspaces.isSpaceActive(name)
-
Check if the given string is the name of a space that is currently active.
Parameter
-
#string name:
-
- vrspaces.locateSpace(name, reference)
-
Locate a space in relative terms.
Parameters
-
#string name: Name of the space to locate -
#string reference: (Optional) Name of the space to locate in reference to. Defaults to ReferenceSpace.Local
Return value
-
- vrspaces.locateSpaceInWorld(name)
-
Locate a space in the game world.
Parameter
-
#string name: Name of the space to locate
Return value
-
- vrspaces.recenterXY()
-
Request a horizontal recenter
- vrspaces.recenterZ()
-
Request a vertical recenter.
Note that this will reset physical sneak reference height, and is best only used at the request of the user.
- #table vrspaces.referenceSpaces
-
Table of ${#ReferenceSpace}.
Local and View will always be supported, but Stage may not. Check before using Stage.
- #number vrspaces.unitsPerMeter
-
Constant used to convert between MW units and meters
- #number vrspaces.version
-
Interface version
Type ActionSpace
Names of ActionSpace type spaces.
These are trackers besides the HMD.
Field(s)
- #string ActionSpace.LeftHandAim
-
/user/hand/left/input/aim/pose
- #string ActionSpace.LeftHandGrip
-
/user/hand/left/input/grip/pose
- #string ActionSpace.LeftHandPalm
-
/user/hand/left/input/palm_ext/pose
- #string ActionSpace.LeftHandPinch
-
/user/hand/left/input/pinch_ext/pose
- #string ActionSpace.LeftHandPoke
-
/user/hand/left/input/poke_ext/pose
- #string ActionSpace.RightHandAim
-
/user/hand/right/input/aim/pose
- #string ActionSpace.RightHandGrip
-
/user/hand/right/input/grip/pose
- #string ActionSpace.RightHandPalm
-
/user/hand/right/input/palm_ext/pose
- #string ActionSpace.RightHandPinch
-
/user/hand/right/input/pinch_ext/pose
- #string ActionSpace.RightHandPoke
-
/user/hand/right/input/poke_ext/pose
Type Pose
A spatial pose, consisting of a position and an orientation
Field(s)
Type ReferenceSpace
Names of reference type spaces.
These are HMD spaces that act as origins for other spaces.
Field(s)
- #string ReferenceSpace.Local
-
Provides a gravity-locked origin around the initial position of the headest.
- #string ReferenceSpace.Stage
-
A gravity-locked, stable stage defined by the implementation. May not be available, so check its availability before use.
- #string ReferenceSpace.View
-
The origin is the HMD itself, and will be constantly moving with the player.