docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Enum XRBaseInteractable.DistanceCalculationMode

    Options for how to calculate an Interactable distance to a location in world space.

    Namespace: UnityEngine.XR.Interaction.Toolkit.Interactables
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public enum XRBaseInteractable.DistanceCalculationMode

    Fields

    Name Description
    ColliderPosition

    Calculates the distance using the Interactable's colliders list using the shortest distance to each. This option has moderate performance cost and should have moderate distance calculation accuracy for most objects.

    ColliderVolume

    Calculates the distance using the Interactable's colliders list using the shortest distance to the closest point of each (either on the surface or inside the Collider). This option has high performance cost but high distance calculation accuracy.

    TransformPosition

    Calculates the distance using the Interactable's transform position. This option has low performance cost, but it may have low distance calculation accuracy for some objects.

    See Also
    distanceCalculationMode
    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)