API

Class WebXRControllerPhysics

Add physics impostor to your webxr controllers, including naive calculation of their linear and angular velocity

Hierarchy (View Summary)

Index
dependsOn?: string[]

The dependencies of this feature, if any

disableAutoAttach: boolean = false

Should auto-attach be disabled?

isDisposed: boolean = false

Is this feature disposed?

onFeatureAttachObservable: Observable<IWebXRFeature> = ...

Observers registered here will be executed when the feature is attached

onFeatureDetachObservable: Observable<IWebXRFeature> = ...

Observers registered here will be executed when the feature is detached

Name: "xr-physics-controller" = WebXRFeatureName.PHYSICS_CONTROLLERS

The module's name

Version: 2

The (Babylon) version of this module. This is an integer representing the implementation version. This number does not correspond to the webxr specs version

  • Update the physics properties provided in the constructor

    Parameters

    • newProperties: {
          friction?: number;
          impostorSize?: number | { depth: number; height: number; width: number };
          impostorType?: number;
          restitution?: number;
      }

      the new properties object

    Returns void