lovr.headset
The lovr.headset
module is where all the magical VR functionality is. With it, you can access connected VR hardware and get information about the available space the player has. Note that all units are reported in meters. Position (0, 0, 0)
is the center of the play area.
Headset
Functions that return information about the active head mounted display (HMD).
lovr.headset.getClipDistance | Get the near and far clipping planes of the headset. |
lovr.headset.setClipDistance | Set the near and far clipping planes of the headset. |
lovr.headset.getDisplayDimensions | Get the dimensions of the headset display. |
lovr.headset.getDisplayFrequency | Get the refresh rate of the headset display. |
lovr.headset.getDisplayHeight | Get the height of the headset display. |
lovr.headset.getDisplayMask | Get a mesh that masks out the visible display area. |
lovr.headset.getDisplayWidth | Get the width of the headset display. |
lovr.headset.getDriver | Get the VR API currently in use for a device. |
lovr.headset.getMirrorTexture | Get the Texture containing a view of what's in the headset. |
lovr.headset.getName | Get the name of the connected headset display. |
lovr.headset.getOriginType | Get the type of tracking origin of the headset. |
lovr.headset.renderTo | Render to the headset using a function. |
lovr.headset.getViewAngles | Get the field of view angles of a view. |
lovr.headset.getViewCount | Get the number of views used for rendering. |
lovr.headset.getViewPose | Get the pose of one of the views. |
Input
Functions for accessing input devices, like controllers, hands, trackers, or gamepads.
lovr.headset.getAngularVelocity | Get the angular velocity of a device. |
lovr.headset.animate | Animate a model to match its Device input state. |
lovr.headset.getAxis | Get the state of an analog axis on a device. |
lovr.headset.isDown | Get the state of a button on a device. |
lovr.headset.getHands | Get a list of currently tracked hand devices. |
lovr.headset.newModel | Get a Model for a device. |
lovr.headset.getOrientation | Get the orientation of a device. |
lovr.headset.getPose | Get the pose of a device. |
lovr.headset.getPosition | Get the position of a device. |
lovr.headset.getSkeleton | Get skeletal joint poses tracked by a device. |
lovr.headset.isTouched | Check if a button on a device is touched. |
lovr.headset.isTracked | Check if a device is currently tracked. |
lovr.headset.getVelocity | Get the linear velocity of a device. |
lovr.headset.vibrate | Make a device go BZZZ! |
lovr.headset.wasPressed | Check if a button was just pressed. |
lovr.headset.wasReleased | Check if a button was just released. |
Play area
Retrieve information about the size and shape of the room the player is in, and provides information about the "chaperone", a visual indicator that appears whenever a player is about to run into a wall.
lovr.headset.getBoundsDepth | Get the depth of the play area. |
lovr.headset.getBoundsDimensions | Get the size of the play area. |
lovr.headset.getBoundsGeometry | Get a list of points that make up the play area boundary. |
lovr.headset.getBoundsWidth | Get the width of the play area. |