Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebXRControllerMovement

This is a movement feature to be used with WebXR-enabled motion controllers. When enabled and attached, the feature will allow a user to move around and rotate in the scene using the input of the attached controllers.

Hierarchy

Implements

Index

Constructors

constructor

Properties

disableAutoAttachSearch playground for disableAutoAttach

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposedSearch playground for isDisposed

isDisposed: boolean

Is this feature disposed?

xrNativeFeatureNameSearch playground for xrNativeFeatureName

xrNativeFeatureName: string

The name of the native xr feature name (like anchor, hit-test, or hand-tracking)

Static Readonly NameSearch playground for Name

Name: "xr-controller-movement" = "xr-controller-movement"

The module's name

Static Readonly REGISTRATIONSSearch playground for REGISTRATIONS

REGISTRATIONS: {}

Standard controller configurations.

Type declaration

Static Readonly VersionSearch playground for Version

Version: 1 = 1

The (Babylon) version of this module. This is an integer representing the implementation version. This number does not correspond to the webxr specs version

Accessors

attached

  • get attached(): boolean

movementDirection

  • Current movement direction. Will be null before XR Frames have been processed.

    Returns Nullable<Quaternion>

movementEnabled

  • get movementEnabled(): boolean
  • set movementEnabled(enabled: boolean): any
  • Is movement enabled

    Returns boolean

  • Sets whether movement is enabled or not

    Parameters

    • enabled: boolean

      is movement enabled

    Returns any

movementOrientationFollowsViewerPose

  • get movementOrientationFollowsViewerPose(): boolean
  • set movementOrientationFollowsViewerPose(followsPose: boolean): any
  • If movement follows viewer pose

    Returns boolean

  • Sets whether movement follows viewer pose

    Parameters

    • followsPose: boolean

      is movement should follow viewer pose

    Returns any

movementSpeed

  • get movementSpeed(): number
  • set movementSpeed(movementSpeed: number): any
  • Gets movement speed

    Returns number

  • Sets movement speed

    Parameters

    • movementSpeed: number

      movement speed

    Returns any

movementThreshold

  • get movementThreshold(): number
  • set movementThreshold(movementThreshold: number): any
  • Gets minimum threshold the controller's thumbstick/touchpad must pass before being recognized for movement (avoids jitter/unintentional movement)

    Returns number

  • Sets minimum threshold the controller's thumbstick/touchpad must pass before being recognized for movement (avoids jitter/unintentional movement)

    Parameters

    • movementThreshold: number

      new threshold

    Returns any

rotationEnabled

  • get rotationEnabled(): boolean
  • set rotationEnabled(enabled: boolean): any
  • Is rotation enabled

    Returns boolean

  • Sets whether rotation is enabled or not

    Parameters

    • enabled: boolean

      is rotation enabled

    Returns any

rotationSpeed

  • get rotationSpeed(): number
  • set rotationSpeed(rotationSpeed: number): any
  • Gets rotation speed factor

    Returns number

  • Sets rotation speed factor (1.0 is default)

    Parameters

    • rotationSpeed: number

      new rotation speed factor

    Returns any

rotationThreshold

  • get rotationThreshold(): number
  • set rotationThreshold(threshold: number): any
  • Gets minimum threshold the controller's thumbstick/touchpad must pass before being recognized for rotation (avoids jitter/unintentional rotation)

    Returns number

  • Sets minimum threshold the controller's thumbstick/touchpad must pass before being recognized for rotation (avoids jitter/unintentional rotation)

    Parameters

    • threshold: number

      new threshold

    Returns any

Methods

attachSearch playground for attach

  • attach(): boolean

detachSearch playground for detach

  • detach(): boolean

disposeSearch playground for dispose

  • dispose(): void

isCompatibleSearch playground for isCompatible

  • isCompatible(): boolean
  • This function will be executed during before enabling the feature and can be used to not-allow enabling it. Note that at this point the session has NOT started, so this is purely checking if the browser supports it

    Returns boolean

    whether or not the feature is compatible in this environment

Legend

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