Need help with Google VR Gaze for cardboard

Does anybody know how to add a delay to gaze before an event is triggered?

I currently have a group of objects in the scene and when you look at each one, they rotate. What I would like to happen is for you to have to look at them for a certain amount of time (3 seconds) and then the rotation or any other event to take place.

It seems like it should be simple to do but I haven’t been able to find any information on it.

Many thanks

You could add a PointerEnter event that just sets a boolean to true (call it beingGazed or whatever you want)… and then in something like Update have a counter that increments when beingGazed is true and then rotates by an amount if the counter is above a certain value.

Or if you wanted precise control over the time set a Time.time variable (called something like gazedTime) on PointerEnter event and have Update check for a difference between now and the gazedTime if beingGazed is True.

And then just set beingGazed to be false on pointerExit (and reset your counter).

Maybe that wouldn’t work for what you want to do but maybe it points you in the right direction?