Options
All
  • Public
  • Public/Protected
  • All
Menu

This is a teleportation 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.

Hierarchy

Index

Constructors

Properties

backwardsMovementEnabled: boolean

Is movement backwards enabled

backwardsTeleportationDistance: number

Distance to travel when moving backwards

disableAutoAttach: boolean

Should auto-attach be disabled?

isDisposed: boolean

Is this feature disposed?

onTargetMeshPositionUpdatedObservable: Observable<PickingInfo>

This observable will notify when the target mesh position was updated. The picking info it provides contains the point to which the target mesh will move ()

parabolicCheckRadius: number

The distance from the user to the inspection point in the direction of the controller A higher number will allow the user to move further defaults to 5 (meters, in xr units)

parabolicRayEnabled: boolean

Should the module support parabolic ray on top of direct ray If enabled, the user will be able to point "at the sky" and move according to predefined radius distance Very helpful when moving between floors / different heights

rotationAngle: number

How much rotation should be applied when rotating right and left

skipNextTeleportation: boolean

Skip the next teleportation. This can be controlled by the user to prevent the user from teleportation to sections that are not yet "unlocked", but should still show the teleportation mesh.

straightRayEnabled: boolean

The second type of ray - straight line. Should it be enabled or should the parabolic line be the only one.

teleportationEnabled: boolean

Is teleportation enabled. Can be used to allow rotation only.

xrNativeFeatureName: string

The name of the native xr feature name (like anchor, hit-test, or hand-tracking)

Name: "xr-controller-teleportation" = "xr-controller-teleportation"

The module's name

Version: 1 = 1

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

  • get attached(): boolean
  • Is this feature attached

    Returns boolean

  • get rotationEnabled(): boolean
  • set rotationEnabled(enabled: boolean): void
  • Is rotation enabled when moving forward? Disabling this feature will prevent the user from deciding the direction when teleporting

    Returns boolean

  • Sets whether rotation is enabled or not

    Parameters

    • enabled: boolean

      is rotation enabled when teleportation is shown

    Returns void

  • get snapPointsOnly(): boolean
  • set snapPointsOnly(snapToPoints: boolean): void
  • Get the snapPointsOnly flag

    Returns boolean

  • Sets the snapPointsOnly flag

    Parameters

    • snapToPoints: boolean

      should teleportation be exclusively to snap points

    Returns void

  • Exposes the currently set teleportation target mesh.

    Returns Nullable<AbstractMesh>

Methods

  • Add a mesh to the list of meshes blocking the teleportation ray

    Parameters

    • mesh: AbstractMesh

      The mesh to add to the teleportation-blocking meshes

    Returns void

  • Add a new mesh to the floor meshes array

    Parameters

    Returns void

  • addSnapPoint(newSnapPoint: Vector3): void
  • Add a new snap-to point to fix teleportation to this position

    Parameters

    • newSnapPoint: Vector3

      The new Snap-To point

    Returns void

  • attach(): boolean
  • attach this feature

    Returns boolean

    true if successful, false is failed or already attached

  • detach(): boolean
  • detach this feature.

    Returns boolean

    true if successful, false if failed or already detached

  • dispose(): void
  • Dispose this feature and all of the resources attached

    Returns void

  • isCompatible(): boolean
  • 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

  • Remove a mesh from the blocker meshes array

    Parameters

    Returns void

  • Remove a mesh from the floor meshes array

    Parameters

    Returns void

  • removeFloorMeshByName(name: string): void
  • Remove a mesh from the floor meshes array using its name

    Parameters

    • name: string

      the mesh name to remove

    Returns void

  • removeSnapPoint(snapPointToRemove: Vector3): boolean
  • This function will iterate through the array, searching for this point or equal to it. It will then remove it from the snap-to array

    Parameters

    • snapPointToRemove: Vector3

      the point (or a clone of it) to be removed from the array

    Returns boolean

    was the point found and removed or not

  • This function sets a selection feature that will be disabled when the forward ray is shown and will be reattached when hidden. This is used to remove the selection rays when moving.

    Parameters

    Returns void

Legend

  • Constructor
  • Property
  • Method
  • Accessor
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Property
  • Method
  • Static property
  • Static method

Settings

Theme