docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface ICurveInteractionDataProvider

    Abstracts the interaction data required to render a curve from an origin to an endpoint.

    Namespace: UnityEngine.XR.Interaction.Toolkit.Interactors.Visuals
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    public interface ICurveInteractionDataProvider

    Properties

    curveOrigin

    The transform used to determine the origin of the curve.

    Declaration
    Transform curveOrigin { get; }
    Property Value
    Type Description
    Transform
    See Also
    NearFarInteractor

    hasValidSelect

    Indicates if the data provider has a valid selection.

    Declaration
    bool hasValidSelect { get; }
    Property Value
    Type Description
    bool
    See Also
    NearFarInteractor

    isActive

    Indicates if the data provider is active. If false, the data in the other fields may be stale.

    Declaration
    bool isActive { get; }
    Property Value
    Type Description
    bool
    See Also
    NearFarInteractor

    lastSamplePoint

    Sample point at the last index of samplePoints.

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

    samplePoints

    The curve sample points used to determine interaction results.

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

    Methods

    TryGetCurveEndNormal(out Vector3, bool)

    Attempts to determine the normal at the endpoint of the curve. This method will transform the captured local direction of the normal on select if tracking a snapped attach point.

    Declaration
    EndPointType TryGetCurveEndNormal(out Vector3 endNormal, bool snapToSelectedAttachIfAvailable = false)
    Parameters
    Type Name Description
    Vector3 endNormal

    Output parameter that will hold the normal vector at the curve's endpoint.

    bool snapToSelectedAttachIfAvailable

    If true, the method will attempt to snap to the selected attach point, if it's available.

    Returns
    Type Description
    EndPointType

    Returns an EndPointType indicating the type of the endpoint where the normal was determined.

    See Also
    NearFarInteractor

    TryGetCurveEndPoint(out Vector3, bool, bool)

    Attempts to determine the end point of the curve. The end point can be set to either an attach point or the end of a raycast hit.

    Declaration
    EndPointType TryGetCurveEndPoint(out Vector3 endPoint, bool snapToSelectedAttachIfAvailable = false, bool snapToSnapVolumeIfAvailable = false)
    Parameters
    Type Name Description
    Vector3 endPoint

    Output parameter that will hold the end point vector.

    bool snapToSelectedAttachIfAvailable

    If set to true, the method will try to snap to the selected attach point, if available.

    bool snapToSnapVolumeIfAvailable

    If set to true, the method will try to snap to the nearest snap volume, if available.

    Returns
    Type Description
    EndPointType

    Returns an EndPointType indicating the type of the end point determined.

    See Also
    NearFarInteractor

    See Also

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