docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ICurveInteractionCaster

    Interface containing necessary information to perform various types of casts along a curve. The caster is responsible for updating the sample points, performing the cast and returning a sorted list of colliders.

    Inherited Members
    IInteractionCaster.isInitialized
    IInteractionCaster.castOrigin
    IInteractionCaster.effectiveCastOrigin
    IInteractionCaster.TryGetColliderTargets(XRInteractionManager, List<Collider>)
    Namespace: UnityEngine.XR.Interaction.Toolkit.Interactors.Casters
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public interface ICurveInteractionCaster : IInteractionCaster

    Properties

    lastSamplePoint

    Gets the sample point at the last index of samplePoints.

    Declaration
    Vector3 lastSamplePoint { get; }
    Property Value
    Type Description
    Vector3
    See Also
    CurveInteractionCaster

    samplePoints

    Gets the curve sample points used to determine interaction results.

    Declaration
    NativeArray<Vector3> samplePoints { get; }
    Property Value
    Type Description
    NativeArray<Vector3>
    See Also
    CurveInteractionCaster

    Methods

    TryGetColliderTargets(XRInteractionManager, List<Collider>, List<RaycastHit>)

    Tries to get a list of collider targets based on the interaction caster's current state, sorted by their distance from the cast origin.

    Declaration
    bool TryGetColliderTargets(XRInteractionManager interactionManager, List<Collider> colliders, List<RaycastHit> raycastHits)
    Parameters
    Type Name Description
    XRInteractionManager interactionManager

    The XR interaction manager.

    List<Collider> colliders

    List of colliders to populate with detected targets.

    List<RaycastHit> raycastHits

    List of raycast hits lined up to the list of colliders.

    Returns
    Type Description
    bool

    True if targets are successfully detected.

    See Also
    CurveInteractionCaster

    See Also

    CurveInteractionCaster
    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)