docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IInteractorDistanceEvaluator

    Defines a method for calculating the distance between an IXRInteractor and an IXRInteractable.

    Namespace: UnityEngine.XR.Interaction.Toolkit
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public interface IInteractorDistanceEvaluator

    Methods

    EvaluateDistance(IXRInteractor, IXRInteractable)

    Evaluates the distance between an interactor and an interactable.

    Declaration
    float EvaluateDistance(IXRInteractor interactor, IXRInteractable interactable)
    Parameters
    Type Name Description
    IXRInteractor interactor

    The IXRInteractor to use in the calculation.

    IXRInteractable interactable

    The IXRInteractable to evaluate the distance to.

    Returns
    Type Description
    float

    The calculated distance as a float.

    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)