Base class for all target providers

Hierarchy (view full)

Constructors

Properties

_currentInteractableHitInfo: InteractableHitInfo = null
camera: default = ...
interactionManager: InteractionManager = ...
targetingMode: TargetingMode

Accessors

  • get endPoint(): vec3
  • Returns vec3

    end position in world space

  • get startPoint(): vec3
  • Returns vec3

    origin position in world space

Methods

  • Set the _currentInteractableHitInfo to null, used when an Interactable is deleted from Lens Studio, to keep state in sync

    Returns void

  • Destroys the provider

    Returns void

  • Returns boolean

    whether the provider has found a target or not

  • Recomputes the target

    Returns void

  • Parameters

    • hits: RayCastHit[]

      list of RayCastHit

    • targetingMode: TargetingMode

      targeting mode used to filter hits

    • getInteractableByCollider: ((collider: ColliderComponent) => Interactable)

      function that is used to get the interactable associated to the collider (to enable the method to be static)

    • offset: number = 0

      offset value that defines if the raycast was offset from the start point

    • camera: default = null

      camera used to verify FoV

    • allowOutOfFovInteraction: boolean = true

      whether interactions that are out of the camera's field of view are allowed

    Returns InteractableHitInfo

    the hit corresponding to the target from the list of hits

  • The nearest deeply nested interactable, is the latest descendant of a list of interactables, when they are ordered by distance.

    Parameters

    Returns InteractableHitInfo

    • the nearest deeply nested interactable