Class WebXRControllerMovement
Hierarchy
- WebXRAbstractFeature
- WebXRControllerMovement
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?
on Feature Attach ObservableSearch playground for onFeatureAttachObservable
Observers registered here will be executed when the feature is attached
on Feature Detach ObservableSearch playground for onFeatureDetachObservable
Observers registered here will be executed when the feature is detached
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 Quaternion
movement Enabled
Is movement enabled
Returns boolean
Sets whether movement is enabled or not
Parameters
enabled: boolean
is movement enabled
Returns void
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 void
movement Speed
Gets movement speed
Returns number
Sets movement speed
Parameters
movementSpeed: number
movement speed
Returns void
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 void
rotation Enabled
Is rotation enabled
Returns boolean
Sets whether rotation is enabled or not
Parameters
enabled: boolean
is rotation enabled
Returns void
rotation Speed
Gets rotation speed factor
Returns number
Sets rotation speed factor (1.0 is default)
Parameters
rotationSpeed: number
new rotation speed factor
Returns void
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 void
Methods
attachSearch playground for attach
attach this feature
Returns boolean
true if successful, false is failed or already attached
detachSearch playground for detach
detach this feature.
Returns boolean
true if successful, false if failed or already detached
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.