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
Gets or sets whether to align the prefab to the raycasted surface normal.
Declaration
public bool alignPrefabWithSurfaceNormal { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
drawWhileSelecting
Gets or sets draw the reticlePrefab while selecting an Interactable.
Declaration
public bool drawWhileSelecting { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
endpointSmoothingTime
Gets or sets smoothing time for endpoint.
Declaration
public float endpointSmoothingTime { get; set; }
Property Value
Type | Description |
---|---|
Single |
maxRaycastDistance
Gets or sets the max distance to RayCast from this Interactor.
Declaration
public float maxRaycastDistance { get; set; }
Property Value
Type | Description |
---|---|
Single |
prefabScalingFactor
Gets or sets amount to scale prefab (before applying distance scaling).
Declaration
public float prefabScalingFactor { get; set; }
Property Value
Type | Description |
---|---|
Single |
raycastMask
Gets or sets layer mask for raycast.
Declaration
public LayerMask raycastMask { get; set; }
Property Value
Type | Description |
---|---|
LayerMask |
reticleActive
Gets or sets whether the reticlePrefab is currently active.
Declaration
public bool reticleActive { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
reticlePrefab
Gets or sets prefab to draw over Raycast destination.
Declaration
public GameObject reticlePrefab { get; set; }
Property Value
Type | Description |
---|---|
GameObject |
undoDistanceScaling
Gets or sets whether to undo the apparent scale of the prefab by distance.
Declaration
public bool undoDistanceScaling { get; set; }
Property Value
Type | Description |
---|---|
Boolean |