Class WebXRControllerMovement
Hierarchy (View Summary)
- WebXRAbstractFeature
- WebXRControllerMovement
Constructors
constructor
-
new WebXRControllerMovement(
_xrSessionManager: WebXRSessionManager,
options: IWebXRControllerMovementOptions,
): WebXRControllerMovementconstructs a new movement controller system
Parameters
- _xrSessionManager: WebXRSessionManager
an instance of WebXRSessionManager
- options: IWebXRControllerMovementOptions
configuration object for this feature
Returns WebXRControllerMovement
- _xrSessionManager: WebXRSessionManager
Properties
Optionaldepends On
The dependencies of this feature, if any
disable Auto Attach
Should auto-attach be disabled?
is Disposed
Is this feature disposed?
on Feature Attach Observable
Observers registered here will be executed when the feature is attached
on Feature Detach Observable
Observers registered here will be executed when the feature is detached
Static ReadonlyName
The module's name
Static ReadonlyREGISTRATIONS
Standard controller configurations.
Static ReadonlyVersion
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
Is this feature attached
Returns boolean
movement Direction
-
Current movement direction. Will be null before XR Frames have been processed.
Returns Quaternion
movement Enabled
-
get movementEnabled(): boolean
Is movement enabled
Returns boolean
-
set movementEnabled(enabled: boolean): void
Sets whether movement is enabled or not
Parameters
- enabled: boolean
is movement enabled
Returns void
- enabled: boolean
movement Orientation Follows Viewer Pose
-
get movementOrientationFollowsViewerPose(): boolean
If movement follows viewer pose
Returns boolean
-
set movementOrientationFollowsViewerPose(followsPose: boolean): void
Sets whether movement follows viewer pose
Parameters
- followsPose: boolean
is movement should follow viewer pose
Returns void
- followsPose: boolean
movement Speed
-
get movementSpeed(): number
Gets movement speed
Returns number
-
set movementSpeed(movementSpeed: number): void
Sets movement speed
Parameters
- movementSpeed: number
movement speed
Returns void
- movementSpeed: number
movement Threshold
-
get movementThreshold(): number
Gets minimum threshold the controller's thumbstick/touchpad must pass before being recognized for movement (avoids jitter/unintentional movement)
Returns number
-
set movementThreshold(movementThreshold: number): void
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
- movementThreshold: number
rotation Enabled
-
get rotationEnabled(): boolean
Is rotation enabled
Returns boolean
-
set rotationEnabled(enabled: boolean): void
Sets whether rotation is enabled or not
Parameters
- enabled: boolean
is rotation enabled
Returns void
- enabled: boolean
rotation Speed
-
get rotationSpeed(): number
Gets rotation speed factor
Returns number
-
set rotationSpeed(rotationSpeed: number): void
Sets rotation speed factor (1.0 is default)
Parameters
- rotationSpeed: number
new rotation speed factor
Returns void
- rotationSpeed: number
rotation Threshold
-
get rotationThreshold(): number
Gets minimum threshold the controller's thumbstick/touchpad must pass before being recognized for rotation (avoids jitter/unintentional rotation)
Returns number
-
set rotationThreshold(threshold: number): void
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
- threshold: number
xr Native Feature Name
-
get xrNativeFeatureName(): string
The name of the native xr feature name (like anchor, hit-test, or hand-tracking)
Returns string
-
set xrNativeFeatureName(name: string): void
The name of the native xr feature name, if applicable (like anchor, hit-test, or hand-tracking)
Parameters
- name: string
Returns void
Methods
attach
-
attach this feature
Returns boolean
true if successful, false is failed or already attached
detach
-
detach this feature.
Returns boolean
true if successful, false if failed or already detached
dispose
-
Dispose this feature and all of the resources attached
Returns void
is Compatible
-
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
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.