Lens Scripting API

    Base class for all target providers

    Hierarchy (View Summary, Expand)

    Index

    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

    • 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 = false

        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

    • Returns boolean

      whether the provider has found a target or not

    • Parameters

      Returns boolean

      whether the TargetProvider is intersecting with the Interactable

    • Recomputes the target

      Returns void

    MMNEPVFCICPMFPCPTTAAATR