Class XRInteractorReticleVisual
Interactor helper object draws a targeting reticlePrefab over a raycasted point in front of the Interactor.
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()