MidnightControls

MidnightControls

447k Downloads

Feature: Gyroscope camera input

SusStew opened this issue ยท 9 comments

commented

Using the gyro for the "mouse" (i.e. cursor or camera) would be useful for controllers like the DualShock or a Nintendo Switch controller. It should be togglable using a bind. There are APIs like the Cemuhook Motion API which are used for motion controls in several emulators, but I don't really know much about Java or programming in general to say if it would work in a mod.
Also, controls can not be bound to the capture button on a Switch Pro controller

commented

I'll look into the gyro control, but the capture button not working is likely an issue with GLFW's gamepad input, the thing this mod is built upon.

commented

Based on the screenshot from the GitHub page, I think it's possible since SDL2's Gamepad API already supports [Gamepad] Motion Sensors, and it should be [according to some devs who successfully implemented it] easy enough to do basic raw gyro aim...but I'm not sure if GLFW added support for it, but after looking around the official website; I don't think so.

As for Cemuhook Motion API: I wouldn't recommend it as that would require a external Input Remapper (DS4Windows, BetterJoy, etc) inorder to make Motion Controls to function.

commented

Using DS4Windows, I personally just made a profile for MC, and have it set so gyro controls mouse, but only while I'm touching the touchpad.

commented

I think this would be a wonderful idea for the future of controllers! Being surrounded by mobs is just a death sentence without a gyro. ALSO... flick stick would be a nice added bonus!!

commented

Having gyro accessible directly with midnight controls would help with switch controllers a lot on Linux, becuase the Linux switch controller driver conflicts with steam, and steam is the only way to easily hack something together to get gyro working in game. I have not been able to get gyro working at all on minecraft in normal Linux installs!

commented

Gyro support is very complicated due to the gyroscope not being easily accessible in Java.
While I'm still searching for a solution, you can try using AntiMicroX for gyro controls.

commented

I barely do Java Programming, but if the gyro sensors are not easily accessible, couldn't you just use JNI to handle that with some other language?

commented

I really hope this mod one day support DS4W's UDP input for gyro, even if as an optional feature.

Controlify folks refuse to add support for that and tell me to just remove DS4W entirely, but 99,9999% of the games i play (emulatores) doesn't support DualShock 4 "extra" features natively and requires DS4W to relay the controls via UDP, so switching back between DS4W and Minecraft would be just annoying.

commented

I really hope this mod one day support DS4W's UDP input for gyro, even if as an optional feature.

Controlify folks refuse to add support for that and tell me to just remove DS4W entirely, but 99,9999% of the games i play (emulatores) doesn't support DualShock 4 "extra" features natively and requires DS4W to relay the controls via UDP, so switching back between DS4W and Minecraft would be just annoying.

You could try mapping DS4's gyro to the mouse. Even with auto detect mode on it won't disable the button icons.