docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    XR Poke Filter

    Filter component that allows for basic poke functionality and to define constraints for when the interactable will be selected.

    Property Description
    Poke Data
     Use Asset Enable to reference an externally defined PokeThresholdData asset using the accompanying field.
     Use Value The PokeThresholdData object associated with this filter which comes with default values editable in the component editor.
     Poke Direction The axis along which the poke interaction will be constrained.
     Interaction Depth Offset Distance along the poke interactable interaction axis that allows for a poke to be triggered sooner/with less precision.
     Enable Poke Angle Threshold When enabled, the filter will check that a poke action is started and moves within the poke angle threshold along the poke direction axis.
     Poke Angle Threshold The maximum allowed angle (in degrees) from the poke direction axis that will trigger a select interaction. Only used when Enable Poke Angle Threshold is enabled.
    Interactable The interactable associated with this poke filter.
    Poke Collider The collider used to compute bounds of the poke interaction.

    Dynamic collider recovery

    If the XRPokeFilter cannot find a collider during Start (for example, when UI Toolkit creates its collider dynamically after the initial frame setup), the filter disables itself and subscribes to the interactable's collidersChanged event. When colliders are later added to the interactable via RegisterCollider or RefreshColliders, the filter receives a CollidersChangedEventArgs, detects the new collider, re-enables itself, and initializes poke interaction. No manual intervention is required.

    Interaction axis length

    The poke interaction depth is computed from the collider's bounds along the configured poke direction axis. The interaction axis length determines how far a poke must travel to reach full press depth. The depth is recomputed at the start of each poke interaction to account for collider bounds that may have changed since the last poke. For colliders with zero thickness along the poke axis (such as those generated by UI Toolkit's Match 2-D document rect collider mode), the poke press will complete instantly. Use a collider with depth along the poke axis (such as Match 3-D bounding box in UI Toolkit or a manually configured BoxCollider) to enable smooth poke depth animation.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)