lovr.headset

Edit

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 on the floor in the center of the play area.

Input

Functions for accessing input devices, like controllers, hands, trackers, or gamepads.

lovr.headset.getAngularVelocityGet the angular velocity of a device.
lovr.headset.getAxisGet the state of an analog axis on a device.
lovr.headset.getDirectionGet the direction a device is pointing.
lovr.headset.getHandsGet a list of currently tracked hand devices.
lovr.headset.getOrientationGet the orientation of a device.
lovr.headset.getPoseGet the pose of a device.
lovr.headset.getPositionGet the position of a device.
lovr.headset.getSkeletonGet skeletal joint transforms tracked by a device.
lovr.headset.getVelocityGet the linear velocity of a device.
lovr.headset.isDownGet the state of a button on a device.
lovr.headset.isTouchedCheck if a button on a device is touched.
lovr.headset.isTrackedCheck if a device is currently tracked.
lovr.headset.stopVibrationStop vibration on a device.
lovr.headset.vibrateMake a device go BZZZ!
lovr.headset.wasPressedCheck if a button was just pressed.
lovr.headset.wasReleasedCheck if a button was just released.

Controller Models

lovr.headset.animateAnimate a model to match its Device input state.
lovr.headset.newModelGet a Model for a device.

Display

Functions that return information about the active head mounted display (HMD).

lovr.headset.getClipDistanceGet the near and far clipping planes of the headset.
lovr.headset.getDisplayDimensionsGet the dimensions of the headset display.
lovr.headset.getDisplayFrequenciesGet the list of refresh rates supported by the display.
lovr.headset.getDisplayFrequencyGet the refresh rate of the display.
lovr.headset.getDisplayHeightGet the height of the headset display.
lovr.headset.getDisplayWidthGet the width of the headset display.
lovr.headset.getFoveationGet the current foveation settings.
lovr.headset.getPassthroughGet the current passthrough mode.
lovr.headset.getPassthroughModesGet the supported passthrough modes.
lovr.headset.getRefreshRateGet the refresh rate of the headset display.
lovr.headset.getRefreshRatesGet the list of refresh rates supported by the display.
lovr.headset.getViewAnglesGet the field of view angles of a view.
lovr.headset.getViewCountGet the number of views used for rendering.
lovr.headset.getViewPoseGet the pose of one of the views.
lovr.headset.setClipDistanceSet the near and far clipping planes of the headset.
lovr.headset.setDisplayFrequencySet the display refresh rate.
lovr.headset.setFoveationSet foveated rendering settings.
lovr.headset.setPassthroughChange current passthrough mode.
lovr.headset.setRefreshRateSet 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.getBoundsDepthGet the depth of the play area.
lovr.headset.getBoundsDimensionsGet the size of the play area.
lovr.headset.getBoundsGeometryGet a list of points that make up the play area boundary.
lovr.headset.getBoundsWidthGet the width of the play area.
lovr.headset.getOriginTypeGet the type of tracking origin of the headset.
lovr.headset.isSeatedCheck 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.getLayersGet the list of active layers.
lovr.headset.newLayerCreate a new Layer.
lovr.headset.setBackgroundSet the background layer.
lovr.headset.setLayersSet the list of active layers.

Miscellaneous

Functions that are internal or return information about the VR session.

lovr.headset.getDeltaTimeGet the predicted delta time.
lovr.headset.getDriverGet the VR API currently in use for a device.
lovr.headset.getFeaturesGet the supported headset features.
lovr.headset.getHandlesGet native pointers to OpenXR objects.
lovr.headset.getNameGet the name of the connected headset display.
lovr.headset.getPassGet a Pass that renders to the headset.
lovr.headset.getTextureGet the Texture for the headset display.
lovr.headset.getTimeGet the predicted display time.
lovr.headset.isFocusedCheck if LÖVR has VR input focus.
lovr.headset.isMountedCheck if the headset is "mounted" (worn on a head).
lovr.headset.isVisibleCheck if content is being shown in the headset display.
lovr.headset.startStarts the headset session.
lovr.headset.submitSubmit a frame to the headset display.
lovr.headset.updateUpdate the headset module.