Home Forums Legacy SDKs Cursor follow the gaze point constantly?

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #5209
    Vladimir
    Participant

    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.

    #5218
    Alex [Tobii]
    Participant
    
    if 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);
    }
    
    #5702
    kevin
    Participant

    could 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)

    #5711
    Grant [Tobii]
    Keymaster

    Hi 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.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.