Home › Forums › Legacy SDKs › Cursor follow the gaze point constantly?
Tagged: mouse
- This topic has 3 replies, 4 voices, and was last updated 8 years, 2 months ago by Grant [Tobii].
- AuthorPosts
- 20/05/2016 at 20:03 #5209VladimirParticipant
Hello guys.
Is there any way to make mouse cursor follow the point where I look at constantly?
I don’t need any smart “warp” functions. I just want a cursor to always point the same spot I’m looking at. I know it is going to jump and jitter. I don’t care. I just need it in whatever state it is.Is there a hidden option somewhere I could not find< or is there any scripts for third party software like FreePIE to make this happen.
The only thing I found is using deltaX\Y but that is not what I am looking for.
23/05/2016 at 10:13 #5218Alex [Tobii]Participantif starting: k = 0.1 currentX = 0 currentY = 0 x = tobiiEyeX.gazePointInPixelsX y = tobiiEyeX.gazePointInPixelsY currentX = currentX + (x-currentX)*k currentY = currentY + (y-currentY)*k mouse.setCursorPosition(currentX, currentY)
you will also need to add a new method to freepie mouse plugin:
public class MousePlugin : Plugin ... [DllImport("user32.dll")] [return: MarshalAs(UnmanagedType.Bool)] static extern bool SetCursorPos(int X, int Y); public void SetCursorPosition(int x, int y) { SetCursorPos(x, y); } ... public class MouseGlobal ... public void setCursorPosition(int x, int y) { plugin.SetCursorPosition(x, y); }
26/09/2016 at 00:36 #5702kevinParticipantcould you explain a little more how to implement this code ie where do i enter it?
ps can i make the mouse courser always invisible when doing this but visible when using a regular mouse?(this isnt THAT important)
27/09/2016 at 15:07 #5711Grant [Tobii]KeymasterHi Kevin (@kevinreu),
The FreePIE website supplies a number of sample scripts to help you get up and running
http://andersmalmgren.github.io/FreePIE/
I would encourage you first to start with their basic samples, then include the EyeX Libraries.
With regard to making the cursor disappear, this would be a high level windows command…certainly nothing within the EyeX SDK
to achieve this.Please bear in mind, we do NOT recommend using the Tobii EyeX Tracker for mouse emulation. The EyeX is designed to work in conjunction with the mouse for optimal computer interaction.
You might also be interested to checkout this 3rd party tool Project IRIS @ http://iris.xcessity.at/
which attempts some mouse emulation also. - AuthorPosts
- You must be logged in to reply to this topic.