docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CurveVisualController

    Behavior designed to provide a versatile and configurable controller for a Line Renderer component, based on data provided from an interactor implementing ICurveInteractionDataProvider to visually represent it.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    CurveVisualController
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(string)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.XR.Interaction.Toolkit.Interactors.Visuals
    Assembly: Unity.XR.Interaction.Toolkit.dll
    Syntax
    [DisallowMultipleComponent]
    [AddComponentMenu("XR/Visual/Curve Visual Controller", 11)]
    [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.2/api/UnityEngine.XR.Interaction.Toolkit.Interactors.Visuals.CurveVisualController.html")]
    public class CurveVisualController : MonoBehaviour
    Remarks

    It uses a configurable origin and direction, along with end point data from the Curve Data Provider, to generate a bezier curve that masks discrepancies between divergent origins, and mask any stabilization applied.

    Properties

    baseLineMaterial

    Material to use in all cases other than when over 3D geometry that is not a valid interactable target.

    Declaration
    public Material baseLineMaterial { get; set; }
    Property Value
    Type Description
    Material

    computeMidPointWithComplexCurves

    Determines if the mid-point is computed for curves with more than 1 segment. Useful to maintain a good shape with projectile curves. Overwrites any line bend ratio settings when active.

    Declaration
    public bool computeMidPointWithComplexCurves { get; set; }
    Property Value
    Type Description
    bool

    curveEndOffset

    Offset at the end of the curve in meters to avoid overlap with the target. Set to 0 to disable.

    Declaration
    public float curveEndOffset { get; set; }
    Property Value
    Type Description
    float

    curveInteractionDataProvider

    Curve data source used to generate the visual curve.

    Declaration
    public ICurveInteractionDataProvider curveInteractionDataProvider { get; set; }
    Property Value
    Type Description
    ICurveInteractionDataProvider

    curveStartOffset

    Offset at the start of the curve to avoid overlap with the origin. Set to 0 to disable.

    Declaration
    public float curveStartOffset { get; set; }
    Property Value
    Type Description
    float

    customizeLinePropertiesForState

    Indicates whether to customize line properties for different endpoint type states.

    Declaration
    public bool customizeLinePropertiesForState { get; set; }
    Property Value
    Type Description
    bool

    emptyHitMaterial

    Material to use when over 3D geometry that is not a valid interactable target.

    Declaration
    public Material emptyHitMaterial { get; set; }
    Property Value
    Type Description
    Material

    endPointExpansionRate

    Rate at which the end point expands and retracts to and from the end point.

    Declaration
    public float endPointExpansionRate { get; set; }
    Property Value
    Type Description
    float

    extendLineToEmptyHit

    Determines if the line should extend out to empty hits, if not, length will be maintained.

    Declaration
    public bool extendLineToEmptyHit { get; set; }
    Property Value
    Type Description
    bool

    extensionRate

    Rate at which the line extends. Set to 0 for instant extension.

    Declaration
    public float extensionRate { get; set; }
    Property Value
    Type Description
    float

    hoverHitProperties

    Line properties when a valid non-UI hit is detected.

    Declaration
    public LineProperties hoverHitProperties { get; set; }
    Property Value
    Type Description
    LineProperties

    lineDynamicsMode

    Specifies the dynamics mode of the line.

    Declaration
    public LineDynamicsMode lineDynamicsMode { get; set; }
    Property Value
    Type Description
    LineDynamicsMode

    lineOriginTransform

    The transform that determines the origin position and direction of the line when overriding.

    Declaration
    public Transform lineOriginTransform { get; set; }
    Property Value
    Type Description
    Transform

    linePropertyAnimationSpeed

    Speed at which the line properties animate when transitioning between states. Set to 0 for instant transitions.

    Declaration
    public float linePropertyAnimationSpeed { get; set; }
    Property Value
    Type Description
    float

    lineRenderer

    "Line renderer to control."

    Declaration
    public LineRenderer lineRenderer { get; set; }
    Property Value
    Type Description
    LineRenderer

    maxVisualCurveDistance

    Maximum distance the visual curve can extend.

    Declaration
    public float maxVisualCurveDistance { get; set; }
    Property Value
    Type Description
    float

    noValidHitProperties

    Line properties when no hit is detected or when over an object that cannot be interacted with.

    Declaration
    public LineProperties noValidHitProperties { get; set; }
    Property Value
    Type Description
    LineProperties

    overrideLineOrigin

    Indicates whether to override the line origin with a custom transform. If no lineOriginTransform is set and this is true, this transform will be used.

    Declaration
    public bool overrideLineOrigin { get; set; }
    Property Value
    Type Description
    bool

    renderLineInWorldSpace

    If true the line will be rendered in world space, otherwise it will be rendered in local space. Set this to false in the event that high speed locomotion causes some visual artifacts with the line renderer.

    Declaration
    public bool renderLineInWorldSpace { get; set; }
    Property Value
    Type Description
    bool

    restingVisualLineLength

    Default length of the line when not extended or retracted.

    Declaration
    public float restingVisualLineLength { get; set; }
    Property Value
    Type Description
    float

    retractDelay

    Delay before the line starts retracting after extending.

    Declaration
    public float retractDelay { get; set; }
    Property Value
    Type Description
    float

    retractDuration

    Duration it takes for the line to fully retract.

    Declaration
    public float retractDuration { get; set; }
    Property Value
    Type Description
    float

    selectHitProperties

    Line properties when a valid selection is detected.

    Declaration
    public LineProperties selectHitProperties { get; set; }
    Property Value
    Type Description
    LineProperties

    snapToSelectedAttachIfAvailable

    Snaps the line to a selected attachment point if available.

    Declaration
    public bool snapToSelectedAttachIfAvailable { get; set; }
    Property Value
    Type Description
    bool

    snapToSnapVolumeIfAvailable

    Snaps the line to a snap volume if available.

    Declaration
    public bool snapToSnapVolumeIfAvailable { get; set; }
    Property Value
    Type Description
    bool

    swapMaterials

    Indicates whether to swap the Line Renderer component's material for different states.

    Declaration
    public bool swapMaterials { get; set; }
    Property Value
    Type Description
    bool

    uiHitProperties

    Line properties when a valid UI hit is detected.

    Declaration
    public LineProperties uiHitProperties { get; set; }
    Property Value
    Type Description
    LineProperties

    uiPressHitProperties

    Line properties when a valid UI press hit is detected.

    Declaration
    public LineProperties uiPressHitProperties { get; set; }
    Property Value
    Type Description
    LineProperties

    visualPointCount

    Number of points used to create the visual curve.

    Declaration
    public int visualPointCount { get; set; }
    Property Value
    Type Description
    int

    Methods

    Awake()

    See MonoBehaviour.

    Declaration
    protected void Awake()

    LateUpdate()

    See MonoBehaviour.

    Declaration
    protected void LateUpdate()

    OnDestroy()

    See MonoBehaviour.

    Declaration
    protected void OnDestroy()

    OnDisable()

    See MonoBehaviour.

    Declaration
    protected void OnDisable()

    OnEnable()

    See MonoBehaviour.

    Declaration
    protected void OnEnable()
    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)