Lens Scripting API

    This class provides indirect targeting functionality using raycasting and spherecasting. It extends the TargetProvider class and uses a configuration object for initialization.

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

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

    Accessors

    • get drawDebug(): boolean

      Returns boolean

    • set drawDebug(debug: boolean): void

      Parameters

      • debug: boolean

      Returns void

    • 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

    • Can be used to reset inner states Should be called when the hand is not tracked or targeting is blocked

      Returns void

    • Recomputes the target

      Returns void

    MMNEPVFCICPMFPCPTTAAATR