Class XRGazeInteractor
Interactor used for interacting with interactables via gaze. This extends XRRay
Inheritance
Implements
Inherited Members
Namespace: UnityEngine .XR.Interaction.Toolkit.Interactors
Assembly: Unity.XR.Interaction.Toolkit.dll
Syntax
[MovedFrom("UnityEngine.XR.Interaction.Toolkit")]
[AddComponentMenu("XR/Interactors/XR Gaze Interactor", 11)]
[HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.interaction.toolkit@3.0/api/UnityEngine.XR.Interaction.Toolkit.Interactors.XRGazeInteractor.html")]
public class XRGazeInteractor : XRRayInteractor, IXRHoverInteractor, IXRSelectInteractor, IXRTargetPriorityInteractor, IXRGroupMember, IXRInteractionStrengthInteractor, IXRActivateInteractor, IXRInteractor, IAdvancedLineRenderable, ILineRenderable, IUIHoverInteractor, IUIInteractor, IXRRayProvider, IXRScaleValueProvider
Properties
clampGazeAssistanceDistanceScaling
If true, the gaze
Declaration
public bool clampGazeAssistanceDistanceScaling { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
gazeAssistanceCalculation
Defines the way the gaze assistance calculates and sizes the assistance area.
Declaration
public XRGazeInteractor.GazeAssistanceCalculation gazeAssistanceCalculation { get; set; }
Property Value
Type | Description |
---|---|
XRGaze |
See Also
gazeAssistanceColliderFixedSize
The size of the gaze
Declaration
public float gazeAssistanceColliderFixedSize { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
gazeAssistanceColliderScale
The scale of the gaze
Declaration
public float gazeAssistanceColliderScale { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
gazeAssistanceDistanceScaling
If true, the gaze
Declaration
public bool gazeAssistanceDistanceScaling { get; set; }
Property Value
Type | Description |
---|---|
bool |
See Also
gazeAssistanceDistanceScalingClampValue
The value the assistance collider scale will be clamped to if clamp
Declaration
public float gazeAssistanceDistanceScalingClampValue { get; set; }
Property Value
Type | Description |
---|---|
float |
See Also
gazeAssistanceSnapVolume
The XRInteractable
Declaration
public XRInteractableSnapVolume gazeAssistanceSnapVolume { get; set; }
Property Value
Type | Description |
---|---|
XRInteractable |
Remarks
Only Sphere
See Also
Methods
Awake()
See Mono
Declaration
protected override void Awake()
Overrides
See Also
GetHoverTimeToSelect(IXRInteractable)
Gets the number of seconds for which this interactor must hover over the interactable to select it if hover
Declaration
protected override float GetHoverTimeToSelect(IXRInteractable interactable)
Parameters
Type | Name | Description |
---|---|---|
IXRInteractable | interactable | The interactable to get the duration for. |
Returns
Type | Description |
---|---|
float | Returns the number of seconds for which this Interactor must hover over an Interactable to select it. |
Overrides
See Also
GetTimeToAutoDeselect(IXRInteractable)
Gets the number of seconds for which this interactor will keep the interactable selected before automatically deselecting it.
Declaration
protected override float GetTimeToAutoDeselect(IXRInteractable interactable)
Parameters
Type | Name | Description |
---|---|---|
IXRInteractable | interactable | The interactable to get the duration for. |
Returns
Type | Description |
---|---|
float | Returns the number of seconds for which this Interactor will keep an Interactable selected before automatically deselecting it. |
Overrides
See Also
PreprocessInteractor(UpdatePhase)
The XRInteraction
Declaration
public override void PreprocessInteractor(XRInteractionUpdateOrder.UpdatePhase updatePhase)
Parameters
Type | Name | Description |
---|---|---|
XRInteraction |
updatePhase | The update phase this is called during. |
Overrides
Remarks
Please see the XRInteraction
See Also
UpdateSnapVolumeInteractable(IXRInteractable)
Updates the gaze
Declaration
protected virtual void UpdateSnapVolumeInteractable(IXRInteractable interactable)
Parameters
Type | Name | Description |
---|---|---|
IXRInteractable | interactable | The IXRInteractable this XRGaze |