// Update is called once per frame void Update() { GazeInputManager.GazeInputEventArgs args = gazeInputManager.GazeTarget; MarkerPos = (args != null ? args.point : eye.position + eye.forward * gazeInputManager.RayMaxDistance); MarkerDir = (args != null ? -args.normal : eye.forward); markerTransform.position = MarkerPos; markerTransform.rotation = Quaternion.LookRotation(MarkerDir, eye.up); }
public void UnSeen(object sender, GazeInputManager.GazeInputEventArgs args) { if (args.target.GetInstanceID() == gameObject.GetInstanceID()) { unSeenEvent.Invoke(); isSeen = false; processed = false; } }
public void Seen(object sender, GazeInputManager.GazeInputEventArgs args) { if (args.target.GetInstanceID() == gameObject.GetInstanceID() && !isSeen) { seenEvent.Invoke(); timeWhenSeen = Time.time; isSeen = true; } }