Mouse Cursor Movement with OnGazeUpdate Method

Forum for C#/Windows development

Mouse Cursor Movement with OnGazeUpdate Method

Postby Emrah » 20 May 2014, 09:25

Hi ,

I am trying to move my mouse pointer after making a calibration with SetCursorPos method ?

Is that a right way to do it ?

I am asking this because sometimes my mouse cursor is jumping one location to another one. I mean , I can't move my cursor as good as an EyeTribeClient.exe.

Is there any better wey to do it ?

public void OnGazeUpdate(GazeData gazeData)
{
double gX = gazeData.SmoothedCoordinates.X;
double gY = gazeData.SmoothedCoordinates.Y;

// Move point, do hit-testing, log coordinates etc.
if (GazeManager.Instance.IsCalibrated)
{
SetCursorPos(Convert.ToInt16(gX), Convert.ToInt16(gY));
}
}
Emrah
 
Posts: 20
Joined: 24 Dec 2013, 07:16

Re: Mouse Cursor Movement with OnGazeUpdate Method

Postby Martin » 21 May 2014, 18:55

Hi Emrah,

Please see the CursorControl.cs on Github.
Martin
 
Posts: 567
Joined: 29 Oct 2013, 15:20


Return to C#