Class EyeTrackingTarget
A game object with the "EyeTrackingTarget" script attached reacts to being looked at independent of other available inputs.
Inheritance
EyeTrackingTarget
Implements
IEventSystemHandler
Assembly: cs.temp.dll.dll
public class EyeTrackingTarget : InputSystemGlobalHandlerListener, IMixedRealityPointerHandler, IMixedRealitySpeechHandler, IMixedRealityBaseInputHandler, IEventSystemHandler
Properties
If true, the eye cursor (if enabled) will snap to the center of this object.
Declaration
public bool EyeCursorSnapToTargetCenter { get; set; }
Property Value
Returns true if the user has been looking at the target for a certain amount of time specified by dwellTimeInSec.
Declaration
public bool IsDwelledOn { get; }
Property Value
Returns true if the user looks at the target or more specifically when the eye gaze ray intersects
with the target's bounding box.
Declaration
public bool IsLookedAt { get; }
Property Value
EyeTrackingTarget eye gaze is currently looking at.
null if currently gazed at object has no EyeTrackingTarget, or if
no object with collider is being looked at.
Declaration
public static EyeTrackingTarget LookedAtEyeTarget { get; }
Property Value
Declaration
public static Vector3 LookedAtPoint { get; }
Property Value
GameObject eye gaze is currently targeting, updated once per frame.
null if no object with collider is currently being looked at.
Declaration
public static GameObject LookedAtTarget { get; }
Property Value
Type |
Description |
GameObject |
|
Event is triggered when the target has been looked at for a given predefined duration (dwellTimeInSec).
Declaration
public UnityEvent OnDwell { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Event is triggered when the user starts to look at the target.
Declaration
public UnityEvent OnLookAtStart { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Event to be triggered when the user is looking away from the target.
Declaration
public UnityEvent OnLookAway { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Event is triggered when the looked at target is selected.
Declaration
public UnityEvent OnSelected { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Event is triggered when the RaiseEventManually_TapDown is called.
Declaration
public UnityEvent OnTapDown { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Event is triggered when the RaiseEventManually_TapUp is called.
Declaration
public UnityEvent OnTapUp { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Most recently selected target, selected either using pointer
or voice.
Declaration
public static GameObject SelectedTarget { get; set; }
Property Value
Type |
Description |
GameObject |
|
Event is triggered when the user continues to look at the target.
Declaration
public UnityEvent WhileLookingAtTarget { get; set; }
Property Value
Type |
Description |
UnityEvent |
|
Methods
Declaration
protected override void OnDisable()
Overrides
Declaration
protected void OnEyeFocusDwell()
Declaration
protected void OnEyeFocusStart()
Declaration
protected void OnEyeFocusStay()
Declaration
protected void OnEyeFocusStop()
Declaration
public void RaiseSelectEventManually()
Overload this method to specify, which global events component wants to listen to.
Use RegisterHandler API of InputSystem
Declaration
protected override void RegisterHandlers()
Overrides
Declaration
protected override void Start()
Overrides
Overload this method to specify, which global events component should stop listening to.
Use UnregisterHandler API of InputSystem
Declaration
protected override void UnregisterHandlers()
Overrides
Explicit Interface Implementations
Declaration
void IMixedRealityPointerHandler.OnPointerClicked(MixedRealityPointerEventData eventData)
Parameters
Declaration
void IMixedRealityPointerHandler.OnPointerDown(MixedRealityPointerEventData eventData)
Parameters
Declaration
void IMixedRealityPointerHandler.OnPointerDragged(MixedRealityPointerEventData eventData)
Parameters
Declaration
void IMixedRealityPointerHandler.OnPointerUp(MixedRealityPointerEventData eventData)
Parameters
Declaration
void IMixedRealitySpeechHandler.OnSpeechKeywordRecognized(SpeechEventData eventData)
Parameters
Implements
IEventSystemHandler