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.

Headset

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.getDeltaTimeGet the predicted delta time.
lovr.headset.getDisplayDimensionsGet the dimensions of the headset display.
lovr.headset.getDisplayFrequenciesGet the list of refresh rates supported by the headset display.
lovr.headset.getDisplayFrequencyGet the refresh rate of the headset display.
lovr.headset.getDisplayHeightGet the height of the headset display.
lovr.headset.getDisplayWidthGet the width of the headset display.
lovr.headset.getDriverGet the VR API currently in use for a device.
lovr.headset.getNameGet the name of the connected headset display.
lovr.headset.getOriginTypeGet the type of tracking origin of the headset.
lovr.headset.getPassGet a Pass that renders to the headset.
lovr.headset.getTextureGet the Texture for the headset 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.submitSubmit a frame to the headset display.

Input

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

lovr.headset.animateAnimate a model to match its Device input state.
lovr.headset.getAngularVelocityGet the angular velocity of a device.
lovr.headset.getAxisGet the state of an analog axis on a device.
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.newModelGet a Model for 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.

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.