docs.unity3d.com
    Show / Hide Table of Contents

    Class XRInteractorReticleVisual

    Interactor helper object draws a targeting reticlePrefab over a raycasted point in front of the Interactor.

    Inheritance
    Object
    XRInteractorReticleVisual
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public class XRInteractorReticleVisual : MonoBehaviour

    Properties

    alignPrefabWithSurfaceNormal

    Whether to align the prefab to the raycasted surface normal.

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

    drawWhileSelecting

    Draw the reticlePrefab while selecting an Interactable.

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

    endpointSmoothingTime

    Smoothing time for endpoint.

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

    maxRaycastDistance

    The max distance to Raycast from this Interactor.

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

    prefabScalingFactor

    Amount to scale prefab (before applying distance scaling).

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

    raycastMask

    Layer mask for raycast.

    Declaration
    public LayerMask raycastMask { get; set; }
    Property Value
    Type Description
    LayerMask

    reticleActive

    Whether the reticle is currently active.

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

    reticlePrefab

    Prefab to draw over Raycast destination.

    Declaration
    public GameObject reticlePrefab { get; set; }
    Property Value
    Type Description
    GameObject

    undoDistanceScaling

    Whether to undo the apparent scale of the prefab by distance.

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

    Methods

    Awake()

    See .

    Declaration
    protected void Awake()

    OnDestroy()

    See .

    Declaration
    protected void OnDestroy()

    Update()

    See .

    Declaration
    protected void Update()
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023