WebXRHitTestLegacy

The currently-working hit-test module. Hit test (or raycasting) is used to interact with the real world. For further information read here - https://github.com/immersive-web/hit-test

Hierarchy

Implements

Index

Constructors

constructor

Find examples in Playground

Properties

lastNativeXRHitResults

Find examples in Playground
lastNativeXRHitResults: XRHitResult[]

Populated with the last native XR Hit Results

onHitTestResultObservable

Find examples in Playground
onHitTestResultObservable: Observable<IWebXRHitResult[]>

Triggered when new babylon (transformed) hit test results are available

options

Find examples in Playground

options to use when constructing this feature

Static Name

Find examples in Playground
Name: string

The module's name

Static Version

Find examples in Playground
Version: number

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

Find examples in Playground
  • get attached(): boolean

Methods

attach

Find examples in Playground
  • attach(): boolean

detach

Find examples in Playground
  • detach(): boolean

dispose

Find examples in Playground
  • dispose(): void

Static XRHitTestWithRay

Find examples in Playground
  • execute a hit test with an XR Ray

    Parameters

    • xrSession: XRSession

      a native xrSession that will execute this hit test

    • xrRay: XRRay

      the ray (position and direction) to use for raycasting

    • referenceSpace: XRReferenceSpace

      native XR reference space to use for the hit-test

    • Optional filter: function

      filter function that will filter the results

    Returns Promise<XRHitResult[]>

    a promise that resolves with an array of native XR hit result in xr coordinates system

Static XRHitTestWithSelectEvent

Find examples in Playground
  • Execute a hit test on the current running session using a select event returned from a transient input (such as touch)

    Parameters

    Returns Promise<XRHitResult[]>

    a promise that resolves with an array of native XR hit result in xr coordinates system

Generated using TypeDoc