I am currently working on some Unity VR project and I have a problem with gaze functions. As an example I will use Google VR DemoScene object named Cube. There is a Teleport script attached with some gaze code at the end:
public void OnGazeEnter() {
SetGazedAt(true);
}
public void OnGazeExit() {
SetGazedAt(false);
}
public void OnGazeTrigger() {
TeleportRandomly();
}
However this fragment seems to be useless and all gaze events are handled by EventTrigger component attached to the Cube object.
My question is - how do you handle gaze events (OnGazeEnter, OnGazeExit, OnGazeTrigger) with this code only? It would be way simpler not to attach EventTrigger component all the time.