Options
All
  • Public
  • Public/Protected
  • All
Menu

The motion controller class for oculus touch (quest, rift). This class supports legacy mapping as well the standard xr mapping

Hierarchy

Index

Constructors

Properties

_doNotLoadControllerMesh: boolean
internal
components: {}

A map of components (WebXRControllerComponent) in this motion controller Components have a ComponentType and can also have both button and axis definitions

Type declaration

disableAnimation: boolean

Disable the model's animation. Can be set at any time.

The gamepad object correlating to this controller

handedness (left/right/none) of this controller

onModelLoadedObservable: Observable<WebXRAbstractMotionController>

Observers registered here will be triggered when the model of this controller is done loading

profileId: string

The profile id of this motion controller

The root mesh of the model. It is null if the model was not yet initialized

MODEL_BASE_URL: string

The base url used to load the left and right controller models

MODEL_LEFT_FILENAME: string

The name of the left controller model file

MODEL_RIGHT_FILENAME: string

The name of the right controller model file

QUEST_MODEL_BASE_URL: string

Base Url for the Quest controller model.

Accessors

  • Backwards compatibility due to a deeply-integrated typo

    Returns MotionControllerHandedness

Methods

  • dispose(): void
  • getComponentIds(): string[]
  • Get the list of components available in this motion controller

    Returns string[]

    an array of strings correlating to available components

  • loadModel(): Promise<boolean>
  • Loads the model correlating to this controller When the mesh is loaded, the onModelLoadedObservable will be triggered

    Returns Promise<boolean>

    A promise fulfilled with the result of the model loading

  • pulse(value: number, duration: number, hapticActuatorIndex?: number): Promise<boolean>
Pulse (vibrate) this controller If the controller does not support pulses, this function will fail silently and return Promise directly after called Consecutive calls to this function will cancel the last pulse call

Parameters

  • value: number

    the strength of the pulse in 0.0...1.0 range

  • duration: number

    Duration of the pulse in milliseconds

  • Optional hapticActuatorIndex: number

    optional index of actuator (will usually be 0)

Returns Promise<boolean>

a promise that will send true when the pulse has ended and false if the device doesn't support pulse or an error accrued

  • updateFromXRFrame(xrFrame: XRFrame): void

Legend

  • Constructor
  • Property
  • Method
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme