playMaker

Author Topic: Gaze Timer  (Read 2969 times)

detomato

  • Playmaker Newbie
  • *
  • Posts: 36
    • View Profile
Gaze Timer
« on: August 23, 2016, 02:03:46 PM »
Hi, is there any gaze timer action available? Already searched the forum, but nothing with the said function. And theres a tut from Youtube which doesnt work as expected.

Basically need an action when an object is gazed for certain amount of time.

Thanks.

topscore1632

  • Playmaker Newbie
  • *
  • Posts: 19
    • View Profile
Re: Gaze Timer
« Reply #1 on: September 05, 2016, 06:08:34 AM »
I did this by basically having a long thin box as a child of the camera. So effectively the same as attaching a pole to your head. Then you put triggers around the objects you're trying to interact with and just look for collisions between the pointer object and the triggers.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Gaze Timer
« Reply #2 on: September 05, 2016, 11:22:38 PM »
Hi,

 It's a good approach indeed. but would require some fiddling around if you wanted to control UI elements too.

 For UI gaze controls, I created a sample on the Ecosystem.



Bye,

 Jean

DinaHaines

  • Playmaker Newbie
  • *
  • Posts: 1
    • View Profile
    • custom essay writing service
Re: Gaze Timer
« Reply #3 on: January 25, 2017, 02:13:29 AM »
In summary, create a script to time the gaze, by cumulatively adding Time.deltaTime on each frame when the object is gazed at. When gaze time hits a pre-specified duration, trigger the button's OnClick event.

On the object, activate the script's gaze timing functions using event triggers Pointer Enter and Pointer Exit.

PET

  • Full Member
  • ***
  • Posts: 136
    • View Profile
    • GamerPET
Re: Gaze Timer
« Reply #4 on: March 15, 2017, 03:54:11 AM »
Hello guys!

What is the best way for this?

Basically I want to have 2 buttons... and I want a button to only trigger when you look at it for like 3 seconds or something. Eventually it would be nice to have an indication... like the button filling up or something.

Thank You!

EDIT:
@Jean - I found your Gaze thingie on the EcoSystem, however it generates an error:

« Last Edit: March 15, 2017, 04:07:04 AM by PET »
Technical Game Designer
www.GamerPET.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Gaze Timer
« Reply #5 on: March 15, 2017, 05:32:24 AM »
Hi,

 yes, good catch, I have fixed the packaging, please get it again from the ecosystem.

 Bye,

 Jean

PET

  • Full Member
  • ***
  • Posts: 136
    • View Profile
    • GamerPET
Re: Gaze Timer
« Reply #6 on: March 15, 2017, 05:38:30 AM »
No error right now. I will test this some more after lunch.

Is there a way to have some kind of bar "filling" to indicate that you have to look at the buttons?

THanks
Technical Game Designer
www.GamerPET.com

PET

  • Full Member
  • ***
  • Posts: 136
    • View Profile
    • GamerPET
Re: Gaze Timer
« Reply #7 on: March 15, 2017, 07:40:10 AM »
Ok. I'm doing a test. I have an Oculus installed & I'm testing the demo scene, the one with the 2 buttons.

Nothing happens if I look at the buttons. I see a red dot in the center of the screen in the EDITOR, but no red tot on Oculus.

But again, nothing happens when I look at the buttons in the demo scene.

EDIT:


It seems that this is not triggering.
« Last Edit: March 15, 2017, 07:44:50 AM by PET »
Technical Game Designer
www.GamerPET.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Gaze Timer
« Reply #8 on: March 15, 2017, 10:42:55 PM »
Hi,

 This demo works by moving the mouse around to move the scene, it's likely that with the oculus, you have a different mechanism and the raycasting may simply shoot in a different direction.

is the red dot above the buttons?

 Bye,

 Jean

PET

  • Full Member
  • ***
  • Posts: 136
    • View Profile
    • GamerPET
Re: Gaze Timer
« Reply #9 on: March 16, 2017, 01:25:30 AM »
I can't really move the mouse around the scene because my Oculus is connected and it's overwriting the movement. I'm moving around the scene with Oculus itself... and like that it's not working.

In the past I used to do some VR interactions with MOuse Look At (or something similar) ... because the mouse cursor was hidden but always present in the middle. This didn't worked on VR because there the rotation is somehow overwriten so I had to change the interaction.

It's a bit weird that I can't really test the buttons when I actually have an Oculus which is what... it being targeted for.
« Last Edit: March 16, 2017, 02:28:34 AM by PET »
Technical Game Designer
www.GamerPET.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Gaze Timer
« Reply #10 on: March 16, 2017, 05:19:45 AM »
Hi,

 this sample is a sample showing how to implement a generic gaze button, it doesn't assume the oculus will be used nor any other device, the example works only by moving the mouse around to move the view around. It should work however if you switch the camera movement to be matching the VR headset, and I am not sure what's happening here.

-  do you see the red dot and is it over the button when you move your head a
round? and when the red dot is over, nothing happens?

- are you playing this scene as is or did you modified it? maybe something is in the way and covers the button hence the button doesn't receive it?

Bye,

 Jean

PET

  • Full Member
  • ***
  • Posts: 136
    • View Profile
    • GamerPET
Re: Gaze Timer
« Reply #11 on: March 16, 2017, 06:47:07 AM »
All I did was to open the scene. No modifications.

I can't move the camera with the mouse, because the Oculus is overwiting any movement. Even if I don't touch the oculus (I left it on the table), the transform values are constantly moving:
https://streamable.com/qpj67

if I manualy turn the oculus to look at a button, nothing happens.

I don't see a red dot on oculus, only in the editor.

I'm 100% sure that I'm looking at the buttons. I even tried to look for 10 seconds at the buttons... nothing happens.



The Screen Point is always at 671.0, 184.0, 0.0. Never moving.
Technical Game Designer
www.GamerPET.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Gaze Timer
« Reply #12 on: March 16, 2017, 07:32:07 AM »
Hi,

 First, there must be a gaze point, else something it wrong:

 please check this screenshot, the gaze point is a regular image in a canvas, if you don't have this, then we must understand first why you don't.

 

 then, I guess either you are missing the ugui proxy ( also feature in this screenshot inspector browser
).

Bye

 Jean

PET

  • Full Member
  • ***
  • Posts: 136
    • View Profile
    • GamerPET
Re: Gaze Timer
« Reply #13 on: March 16, 2017, 07:34:24 AM »
I'm using the exact scene that comes with the project from the EcoSystem.




What other files did you changed in yesterday's bug report? Only that "RectTransformWorldToScreenPoint.cs"? Because I only re-downloaded that file.
Technical Game Designer
www.GamerPET.com

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 12351
  • Official Playmaker Support
    • View Profile
Re: Gaze Timer
« Reply #14 on: March 16, 2017, 10:59:08 PM »
Hi,

 can you show your game view, if the image is there in the hierarchy, it's should be visible in the game view.

I am not sure waht you mean with the last sentence:
"What other files did you changed in yesterday's bug report? Only that "RectTransformWorldToScreenPoint.cs"? Because I only re-downloaded that file."

what bug report are you refering to? you should update the gaze sample, not just that file.

 Do you still have errors in the console?

Bye,

 Jean