lovr.headset
EditThe 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 on the floor in 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.getDeltaTime | Get the predicted delta time. |
lovr.headset.getDisplayDimensions | Get the dimensions of the headset display. |
lovr.headset.getDisplayFrequencies | Get the list of refresh rates supported by 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.getDisplayWidth | Get the width of the headset display. |
lovr.headset.getDriver | Get the VR API currently in use for a device. |
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.getPass | Get a Pass that renders to the headset. |
lovr.headset.getTexture | Get the Texture for the headset display. |
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. |
lovr.headset.setClipDistance | Set the near and far clipping planes of the headset. |
lovr.headset.setDisplayFrequency | Set the display refresh rate. |
lovr.headset.submit | Submit a frame to the headset display. |
Input
Functions for accessing input devices, like controllers, hands, trackers, or gamepads.
lovr.headset.animate | Animate a model to match its Device input state. |
lovr.headset.getAngularVelocity | Get the angular velocity of a device. |
lovr.headset.getAxis | Get the state of an analog axis on a device. |
lovr.headset.getHands | Get a list of currently tracked hand devices. |
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 transforms tracked by a device. |
lovr.headset.getVelocity | Get the linear velocity of a device. |
lovr.headset.isDown | Get the state of a button on 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.newModel | Get a Model for 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. |