Lens Scripting API
    Preparing search index...

    Hand based poke target provider. Uses a sphere cast from index mid joint to index tip

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _currentInteractableHitInfo: InteractableHitInfo = null
    interactionManager: InteractionManager = ...
    targetingMode: TargetingMode = TargetingMode.Poke

    Accessors

    • get currentInteractableSet(): Set<Interactable>

      Returns Set<Interactable>

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

      Returns boolean

    • get normalizedPokeDepth(): number

      Gets the normalized poke depth based on the tip-to-knuckle distance.

      Returns number

      A normalized value (0-1) where 1 represents a poke depth equal to the tip-to-knuckle distance.

    • get pokeDepth(): number

      Gets the current poke depth - the distance between the index finger tip and the hit surface.

      Returns number

      The poke depth in centimeters, or 0 if not currently poking an interactable.

    • get pokeIsValid(): boolean

      Returns boolean

    • 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

    • Returns any

    • Calculates the interaction strength based on the distance traveled from the initial poke position. The strength is normalized between 0 and 1, where 0 represents no interaction and 1 represents maximum interaction strength when the distance threshold is reached.

      Returns number

      A normalized value between 0 and 1 representing the interaction strength, or 0 if no interaction is active.

    • Returns boolean

      whether the provider has found a target or not

    • Checks if the poke target provider is available for use by verifying hand tracking state.

      Returns boolean

      true if the hand is tracked, false otherwise.

    • Determines whether the poke target provider is currently triggering an interaction.

      Returns boolean

      true if there is a current interactable hit and the provider is actively triggering, false otherwise.