docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IAdvancedLineRenderable

    An advanced interface for providing line data for rendering with additional functionality.

    Inherited Members
    ILineRenderable.GetLinePoints(ref Vector3[], out int)
    ILineRenderable.TryGetHitInfo(out Vector3, out Vector3, out int, out bool)
    Namespace: UnityEngine.XR.Interaction.Toolkit.Interactors.Visuals
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
    public interface IAdvancedLineRenderable : ILineRenderable

    Methods

    GetLineOriginAndDirection(out Vector3, out Vector3)

    Gets the line origin and direction. Origin and Direction are in world space coordinates.

    Declaration
    void GetLineOriginAndDirection(out Vector3 origin, out Vector3 direction)
    Parameters
    Type Name Description
    Vector3 origin

    Point in space where the line originates from.

    Vector3 direction

    Direction vector used to draw line.

    See Also
    XRInteractorLineVisual
    XRRayInteractor

    GetLinePoints(ref NativeArray<Vector3>, out int, Ray?)

    Gets the polygonal chain represented by a list of endpoints which form line segments to approximate the curve. Positions are in world space coordinates.

    Declaration
    bool GetLinePoints(ref NativeArray<Vector3> linePoints, out int numPoints, Ray? rayOriginOverride = null)
    Parameters
    Type Name Description
    NativeArray<Vector3> linePoints

    When this method returns, contains the sample points if successful.

    int numPoints

    When this method returns, contains the number of sample points if successful.

    Ray? rayOriginOverride

    Optional ray origin override used when re-computing the line.

    Returns
    Type Description
    bool

    Returns true if the sample points form a valid line, such as by having at least two points. Otherwise, returns false.

    See Also
    XRInteractorLineVisual
    XRRayInteractor

    See Also

    XRInteractorLineVisual
    XRRayInteractor
    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)