GazeCam Sample with images

Forum for development eye controlled Unity 3D applications

GazeCam Sample with images

Postby hou.hanru » 17 Jan 2015, 21:48

Hello,

I am working with the GazeCam Unity Sample, and I wonder if the fact that the cube becomes red when looking is implemented in the script/code? How do I change this, if I for example want an image instead of colour to appear? I also wonder how do I change the fact that the colour of the cube is red only when looking and not once activated through gaze. I looked at the different scripts but I can only see one of them attached to the main camera. What are the others for?

Thanks for help :!:
hou.hanru
 
Posts: 4
Joined: 25 Nov 2014, 18:20

Re: GazeCam Sample with images

Postby Anders » 18 Jan 2015, 12:01

How do I change this, if I for example want an image instead of colour to appear?


Take a look at the GazeCamera class and the checkGazeCollision method. Substitute the color with a texture.

...how do I change the fact that the colour of the cube is red only when looking and not once activated through gaze.


I am not sure I understand the difference between these two states?

What are the others [scripts] for?


Search the Unity scene graph and you will be able to see what GameObjects the scripts are attached to.

BR,
Anders
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23

Re: GazeCam Sample with images

Postby hou.hanru » 19 Jan 2015, 05:23

Oh I see. And if the every cube should appear with different colour, I multiply the function?

...how do I change the fact that the colour of the cube is red only when looking and not once activated through gaze.


I mean if it possible that the cube stays red even when not looking anymore.


Best,
hou.hanru
 
Posts: 4
Joined: 25 Nov 2014, 18:20

Re: GazeCam Sample with images

Postby Anders » 19 Jan 2015, 10:36

And if the every cube should appear with different color, I multiply the function?


If you want every cube to have a different color, then you need to implement the logic to handle it. That could be done by using different tags on every cube as identifies and then setting color accordingly. You could also add scripts to the cubes that handle this. You would most likely be able to find a tutorial about this in the official Unity forum.

I mean if it possible that the cube stays red even when not looking anymore.


Sure that is possible. Just alter the existing code or implement your own logic.
Anders
 
Posts: 124
Joined: 29 Oct 2013, 16:23


Return to Unity



cron