Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Constructors

Properties

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposed: boolean

Is this feature disposed?

xrNativeFeatureName: string

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

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

The module's name

REGISTRATIONS: {}

Standard controller configurations.

Type declaration

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

  • get attached(): boolean
  • Is this feature attached

    Returns boolean

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

    Returns Quaternion

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

    Returns boolean

  • Sets whether movement is enabled or not

    Parameters

    • enabled: boolean

      is movement enabled

    Returns void

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

    Returns boolean

  • Sets whether movement follows viewer pose

    Parameters

    • followsPose: boolean

      is movement should follow viewer pose

    Returns void

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

    Returns number

  • Sets movement speed

    Parameters

    • movementSpeed: number

      movement speed

    Returns void

  • get movementThreshold(): number
  • set movementThreshold(movementThreshold: number): void
  • 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 void

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

    Returns boolean

  • Sets whether rotation is enabled or not

    Parameters

    • enabled: boolean

      is rotation enabled

    Returns void

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

    Returns number

  • Sets rotation speed factor (1.0 is default)

    Parameters

    • rotationSpeed: number

      new rotation speed factor

    Returns void

  • get rotationThreshold(): number
  • set rotationThreshold(threshold: number): void
  • 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 void

Methods

  • attach(): boolean
  • attach this feature

    Returns boolean

    true if successful, false is failed or already attached

  • detach(): boolean
  • detach this feature.

    Returns boolean

    true if successful, false if failed or already detached

  • dispose(): void
  • Dispose this feature and all of the resources attached

    Returns void

  • 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
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme