Add support for eye tracking hardware, for example the Tobii 5, used as an alternative to mice. Combined with the rest of MidnightControls' other features, this allows a way to play Minecraft without using hands, for both tech enthusiasts and those who do not have the use of their hands for their computer.
The implementation is not hardware specific: any eye tracking device that used to control the cursor will work the same. The difference between eye tracking and normal mouse behavior is only a little math to interpret the cursor movement. I believe I have left plenty of inline comments, but let me know if there are more questions I could leave better documentation on.
I also believe this feature should be pretty stable, regardless of what Mojang changes in future updates - I don't have much reason to believe they would change cursor behavior. The one major dependency is around the client.player.changeLookDirection() call from Mouse.updateMouse(), but otherwise interfacing with the rest of the base game is kept to a minimum.
New settings copy has been created for toggling the setting on & off, and for adjusting the deadzone around the cursor.
One limitation: Ranged combat is possible, but harder than intended. I am able to play on Easy, but I don't have a better idea that wouldn't be considered cheating or needing server-side mods. Since there are are many players interested in Creative Mode, redstoning, or Survival Easy, I still feel that this feature is still worthwhile enough.
Contributor's test setup:
Windows 10
Minecraft 1.19 and 1.20 (most playtesting performed on 1.19, but I rebased this for 1.20. Let me know if a 1.19 release is desirable)
Tobii 5 eye tracker (as mouse)
Talon Voice (as verbal keyboard)
Xbox Accessibility Controller with musician foot pedals as buttons (as xbox controller, which works thanks to MidnightControls allowing controller, keyboard and mouse input at the same time)
Add support for eye tracking hardware, for example the Tobii 5, used as an alternative to mice. Combined with the rest of MidnightControls' other features, this allows a way to play Minecraft without using hands, for both tech enthusiasts and those who do not have the use of their hands for their computer.
The implementation is not hardware specific: any eye tracking device that used to control the cursor will work the same. The difference between eye tracking and normal mouse behavior is only a little math to interpret the cursor movement. I believe I have left plenty of inline comments, but let me know if there are more questions I could leave better documentation on.
I also believe this feature should be pretty stable, regardless of what Mojang changes in future updates - I don't have much reason to believe they would change cursor behavior. The one major dependency is around the
client.player.changeLookDirection()
call fromMouse.updateMouse()
, but otherwise interfacing with the rest of the base game is kept to a minimum.New settings copy has been created for toggling the setting on & off, and for adjusting the deadzone around the cursor.
One limitation: Ranged combat is possible, but harder than intended. I am able to play on Easy, but I don't have a better idea that wouldn't be considered cheating or needing server-side mods. Since there are are many players interested in Creative Mode, redstoning, or Survival Easy, I still feel that this feature is still worthwhile enough.
Contributor's test setup: