Class WebXRControllerMovement
Hierarchy
-
WebXRAbstractFeature
- WebXRControllerMovement
Implements
Index
Constructors
Properties
Accessors
Methods
Constructors
constructor
-
constructs a new movement controller system
Parameters
-
_xrSessionManager: WebXRSessionManager
an instance of WebXRSessionManager
-
options: IWebXRControllerMovementOptions
configuration object for this feature
Returns WebXRControllerMovement
-
Properties
disable Auto AttachSearch playground for disableAutoAttach
Should auto-attach be disabled?
is DisposedSearch playground for isDisposed
Is this feature disposed?
xr Native Feature NameSearch playground for xrNativeFeatureName
The name of the native xr feature name (like anchor, hit-test, or hand-tracking)
Static Readonly NameSearch playground for Name
The module's name
Static Readonly REGISTRATIONSSearch playground for REGISTRATIONS
Standard controller configurations.
Type declaration
-
[key: string]: WebXRControllerMovementRegistrationConfiguration[]
Static Readonly VersionSearch playground for Version
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
-
Is this feature attached
Returns boolean
movement Direction
-
Current movement direction. Will be null before XR Frames have been processed.
Returns Nullable<Quaternion>
movement Enabled
-
Is movement enabled
Returns boolean
-
Sets whether movement is enabled or not
Parameters
-
enabled: boolean
is movement enabled
Returns any
-
movement Orientation Follows Viewer Pose
-
If movement follows viewer pose
Returns boolean
-
Sets whether movement follows viewer pose
Parameters
-
followsPose: boolean
is movement should follow viewer pose
Returns any
-
movement Speed
-
Gets movement speed
Returns number
-
Sets movement speed
Parameters
-
movementSpeed: number
movement speed
Returns any
-
movement Threshold
-
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
-
rotation Enabled
-
Is rotation enabled
Returns boolean
-
Sets whether rotation is enabled or not
Parameters
-
enabled: boolean
is rotation enabled
Returns any
-
rotation Speed
-
Gets rotation speed factor
Returns number
-
Sets rotation speed factor (1.0 is default)
Parameters
-
rotationSpeed: number
new rotation speed factor
Returns any
-
rotation Threshold
-
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
-
Returns boolean
detachSearch playground for detach
-
Returns boolean
disposeSearch playground for dispose
-
Dispose this feature and all of the resources attached
Returns void
is CompatibleSearch playground for isCompatible
-
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.