Really need help - coding problem

Forum for development eye controlled Unity 3D applications

Really need help - coding problem

Postby biostrike666 » 24 Aug 2014, 13:17

Hi, i am a beginer programer.

i am planning to design a game in unity with eyetribe device.
Thus, i studied for some exmaples, such as anglebots, gazecam, and unofficial-eyetribe-unity3d that created by richstoner.

But for me, its is hard to understand at this stage.

So may i ask a question?

I believe that the device will detect our eye location.
So, there may include device.lefteye.position & device.righteye.position.

I want to make the same effect like gazecam. The lefteye texture will move accrording to my left eye move.

Thus, in unity, i planning to wrtie such as...

public GameObject lefteye;

void Update () {

lefteye.transform.position = device.lefteye.position

}

But i do not know and i cannot find the relative coding from http://eyetribe.github.io/tet-csharp-client/#

So may i ask how to write this code or any easier way to write.

I just wanna have the same eff name as gazecam, once my eye move, the texture will move accoring to my eye.


thankyou very much
biostrike666
 
Posts: 2
Joined: 08 Aug 2014, 08:26

Re: Really need help - coding problem

Postby Anders » 19 Sep 2014, 06:49

Hi

The official Unity sample GazeCam contains everything you here ask for. Since this sample is open source you are free to look into the scripts used in that demo.

It seems that you are interested in placing textures based on pupil position. You should take a look at the script associated to the calibration scene for this.

Hope this helps.

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


Return to Unity



cron