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.
Input
Functions for accessing input devices, like controllers, hands, trackers, or gamepads.
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.getDirection | Get the direction a device is pointing. |
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.stopVibration | Stop vibration on 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. |
Controller Models
lovr.headset.animate | Animate a model to match its Device input state. |
lovr.headset.newModel | Get a Model for a device. |
Display
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.getDisplayDimensions | Get the dimensions of the headset display. |
lovr.headset.getDisplayFrequencies | Get the list of refresh rates supported by the display. |
lovr.headset.getDisplayFrequency | Get the refresh rate of the display. |
lovr.headset.getDisplayHeight | Get the height of the headset display. |
lovr.headset.getDisplayWidth | Get the width of the headset display. |
lovr.headset.getFoveation | Get the current foveation settings. |
lovr.headset.getPassthrough | Get the current passthrough mode. |
lovr.headset.getPassthroughModes | Get the supported passthrough modes. |
lovr.headset.getRefreshRate | Get the refresh rate of the headset display. |
lovr.headset.getRefreshRates | Get the list of refresh rates supported by the 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.setFoveation | Set foveated rendering settings. |
lovr.headset.setPassthrough | Change current passthrough mode. |
lovr.headset.setRefreshRate | Set the display refresh rate. |
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. |
lovr.headset.getOriginType | Get the type of tracking origin of the headset. |
lovr.headset.isSeated | Check if the coordinate space is standing or seated. |
Layers
Layers are 2D textured quads that can be placed in 3D space. They are higher quality than rendering regular planes in the 3D scene.
lovr.headset.getLayers | Get the list of active layers. |
lovr.headset.newLayer | Create a new Layer. |
lovr.headset.setBackground | Set the background layer. |
lovr.headset.setLayers | Set the list of active layers. |
Miscellaneous
Functions that are internal or return information about the VR session.
lovr.headset.getDeltaTime | Get the predicted delta time. |
lovr.headset.getDriver | Get the VR API currently in use for a device. |
lovr.headset.getFeatures | Get the supported headset features. |
lovr.headset.getHandles | Get native pointers to OpenXR objects. |
lovr.headset.getName | Get the name of the connected headset display. |
lovr.headset.getPass | Get a Pass that renders to the headset. |
lovr.headset.getTexture | Get the Texture for the headset display. |
lovr.headset.getTime | Get the predicted display time. |
lovr.headset.isFocused | Check if LÖVR has VR input focus. |
lovr.headset.isMounted | Check if the headset is "mounted" (worn on a head). |
lovr.headset.isVisible | Check if content is being shown in the headset display. |
lovr.headset.start | Starts the headset session. |
lovr.headset.submit | Submit a frame to the headset display. |
lovr.headset.update | Update the headset module. |