Class WebXRWalkingLocomotion
Hierarchy (View Summary)
- WebXRAbstractFeature
- WebXRWalkingLocomotion
Constructors
constructor
-
new WebXRWalkingLocomotion(
sessionManager: WebXRSessionManager,
options: IWebXRWalkingLocomotionOptions,
): WebXRWalkingLocomotionConstruct a new Walking Locomotion feature.
Parameters
- sessionManager: WebXRSessionManager
manager for the current XR session
- options: IWebXRWalkingLocomotionOptions
creation options, prominently including the vector target for locomotion
Returns WebXRWalkingLocomotion
- sessionManager: 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
Accessors
attached
-
get attached(): boolean
Is this feature attached
Returns boolean
locomotion Target
-
The target to be articulated by walking locomotion. When the walking locomotion feature detects walking in place, this element's X and Z coordinates will be modified to reflect locomotion. This target should be either the XR space's origin (i.e., the parent node of the WebXRCamera) or the WebXRCamera itself. Note that the WebXRCamera path will modify the position of the WebXRCamera directly and is thus discouraged.
Returns TransformNode | WebXRCamera
-
The target to be articulated by walking locomotion. When the walking locomotion feature detects walking in place, this element's X and Z coordinates will be modified to reflect locomotion. This target should be either the XR space's origin (i.e., the parent node of the WebXRCamera) or the WebXRCamera itself. Note that the WebXRCamera path will modify the position of the WebXRCamera directly and is thus discouraged.
Parameters
- locomotionTarget: TransformNode | WebXRCamera
Returns void
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
StaticName
-
get Name(): string
The module's name.
Returns string
StaticVersion
-
get Version(): number
The (Babylon) version of this module. This is an integer representing the implementation version. This number has no external basis.
Returns number
Methods
attach
-
Attaches the feature. Typically called automatically by the features manager.
Returns boolean
true if attach succeeded, false otherwise
detach
-
Detaches the feature. Typically called automatically by the features manager.
Returns boolean
true if detach succeeded, false otherwise
dispose
-
Dispose this feature and all of the resources attached
Returns void
is Compatible
-
Checks whether this feature is compatible with the current WebXR session. Walking locomotion is only compatible with "immersive-vr" sessions.
Returns boolean
true if compatible, false otherwise
A module that will enable VR locomotion by detecting when the user walks in place.