Home › Forums › Software Development › Unity: Values Returned by LastGazePoint are negative › Reply To: Unity: Values Returned by LastGazePoint are negative
Hi Stephen,
There are a couple of different things here:
1) The LastGazePoint.Screen.x can be negative if the user is actually looking to the left of the physical screen. EyeX simply maps the gaze point to the virtual screen coordinates in Windows, where 0,0 is the top left corner of the primary screen. Compare with the situation where you have two monitors attached to your computer, and the secondary monitor is placed to the left of the primary. Then all screen coordinates on the secondary monitor will have negative x coordinates. In EyeX for Unity the EyeXGazePoint type offers conversions to the Screen space based on the coordinates of the virtual screen, where the x value might be negative, meaning outside to the left of the game window.
2) You seem to have an offset problem, so the negative values might be incorrect in the sense that you are not looking to the left of the window but still get negative values. My setup is with a 27″ screen, and I have very good accuracy in the middle of the screen, but much less accuracy in the upper left and upper right corners of my screen. Where are the menu items placed that you are trying to hit? If you run the EyeX Unity samples in the editor with the Maximise on Play option selected, and tab your way to the gaze point stream scene, do you see the offset problem there in the location on the screen where you have your menu items in your game?
3) If your menu buttons are 2D and overlayed on the game, you suggest you take a look at the EyeX demo scene with the Activatable GUI buttons and consider using activatable interactors instead of using ray casting.