public void LeaveObject(GazeTarget target) { foreach (var listener in _stateListeners) { listener.OnGazeExit(target); } }
public void EnterObejct(GazeTarget target) { foreach (var listener in _stateListeners) { listener.OnGazeEnter(target); } }
public override void OnGazeEnter(GazeTarget target) { //gameObject.SetActive(true); UpdateLocalDistanceFromTarget(target); if (target.Reactable) { _inExplosion = true; } }
public void MoveOverObject(GazeTarget target) { foreach (var listener in _stateListeners) { listener.OnGazeMoveOver(target); } ExecuteEvents.Execute <IPointerMoveHandler>(_currentTarget.Target, _pointerData, (x, y) => x.OnPointerMove(_pointerData)); }
void UpdateCurrentDataToGazeTarget(GazeTarget target) { Camera camera = _pointerData.enterEventCamera; GameObject gazeObject = GetCurrentGameObject(); Vector3 intersectionPosition = _pointerData.pointerCurrentRaycast.worldPosition; bool clickable = _pointerData.pointerPress != null || ExecuteEvents.GetEventHandler <IPointerClickHandler>(gazeObject) != null; target.Source = camera; target.Target = gazeObject; target.Position = intersectionPosition; target.Reactable = clickable; }
public override void OnGazeExit(GazeTarget target) { if (GameObject.Find("LarCamera").GetComponent <LarManager>().HideEnableGazeInput == true) { gameObject.SetActive(false); } else { gameObject.SetActive(true); } _distance = _maxDistance; if (target.Reactable) { _inExplosion = false; } }
protected void UpdateLocalDistanceFromTarget(GazeTarget target) { Vector3 targetLocalPosition = new Vector3(target.Position.x, target.Position.y, target.Position.z); if (Vector3.zero.Equals(targetLocalPosition)) { //Debug.Log("target Position is zero : "); if (target.Target != null) { targetLocalPosition = new Vector3(target.Target.transform.position.x, target.Target.transform.position.y, target.Target.transform.position.z); } } float tmpDistance = Vector3.Distance(GazeCursorBase.Instance().transform.position, targetLocalPosition); _distance = Mathf.Clamp(tmpDistance, _minDistance, _maxDistance); }
public override void OnGazeMoveOver(GazeTarget target) { UpdateLocalDistanceFromTarget(target); }
public abstract void OnGazeMoveOver(GazeTarget target);
public abstract void OnGazeExit(GazeTarget target);
public abstract void OnGazeEnter(GazeTarget target);