VrApi

interface VrApi

Offers VR-related functionality. Accessible through Player.vr

Properties

gyroscopicOrientationProvider
Link copied to clipboard
abstract var gyroscopicOrientationProvider: OrientationProvider?
The gyroscopic OrientationProvider that is used for VR control.
isGyroscopeEnabled
Link copied to clipboard
abstract var isGyroscopeEnabled: Boolean
Specifies whether the gyroscope of the device is enabled.
isStereo
Link copied to clipboard
abstract var isStereo: Boolean
Specifies whether stereo mode is enabled.
isTouchControlEnabled
Link copied to clipboard
abstract var isTouchControlEnabled: Boolean
Specifies whether the touch controls of the device are enabled.
touchOrientationProvider
Link copied to clipboard
abstract var touchOrientationProvider: OrientationProvider?
The touch OrientationProvider that is used for VR control.
viewingDirection
Link copied to clipboard
abstract var viewingDirection: ViewingDirection?
The current viewing direction.
viewingDirectionChangeEventInterval
Link copied to clipboard
abstract var viewingDirectionChangeEventInterval: Double
The minimal interval between consecutive VrViewingDirectionChanges.
viewingDirectionChangeThreshold
Link copied to clipboard
abstract var viewingDirectionChangeThreshold: Double
The number of degrees that the viewport can change before the VrViewingDirectionChange is triggered.

Functions

moveViewingDirection
Link copied to clipboard
abstract fun moveViewingDirection(direction: Vector3)
Moves the current VR viewing direction in the given direction with the given speed by passing a three-component Vector3.
setVrRenderer
Link copied to clipboard
abstract fun setVrRenderer(renderer: VrRenderer?)
Sets the VrRenderer that is used to modify VR properties.