docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum NearFarInteractor.NearCasterSortingStrategy

    Enum used to determine the strategy used to compute the the distance used to sort valid targets discovered by the near interaction caster.

    Namespace: UnityEngine.XR.Interaction.Toolkit.Interactors
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public enum NearFarInteractor.NearCasterSortingStrategy

    Fields

    Name Description
    ClosestPointOnCollider

    Sorting is performed based on the square distance between the interactor's attach transform world position and the closest point of that position on the interactable's collider. This is an expensive sorting strategy and should only be used if there is a need for high fidelity disambiguation between interactables that are very close to each other.

    InteractableBased

    Sorting is performed based on the interactable's defined sorting strategy. The callstack used here is the most extensive one, and performance will depend on the implementation of the interactable's sorting strategy, which defaults to being collider based.

    None

    No sorting should be performed.

    SquareDistance

    Sorting is performed based on the square distance between the interactor and interactable attach transform world positions. This is the most efficient sorting strategy.

    See Also
    nearCasterSortingStrategy
    In This Article
    Back to top
    Copyright © 2025 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)