LambdAurora / LambdaControls

A minecraft mod which adds better controls and controller support.
MIT License
67 stars 20 forks source link

VR Controller Support + Haptic Feedback #36

Open halotroop2288 opened 4 years ago

halotroop2288 commented 4 years ago

As a part of my VR mod for Fabric (a half-port, half-rewrite of Vivecraft), I may need to created a library mod for MCOpenVR (An OpenVR helper for Minecraft). If I do, it may become trivial to add support for VR controllers and haptic feedback for those controllers.

I was wondering if you would consider adding support for VR controllers if I do. In which case, instead of implementing that support myself, I might just include LambdaControls in my mod.

LambdAurora commented 4 years ago

Adding any kind of support for controllers is welcomed but I guess GLFW and SDL2 mappings cannot be used in those situations right?

This might require quite a lot of effort and help would be welcome.

halotroop2288 commented 4 years ago

The first commit has been pushed. (link) Note, if you do not have a VR headset (HMD) you may use the SteamVR null driver. (link) (but you will need one anyway to debug I/O.)

This first commit only initializes the system. More will come as I use it to develop VRCraft.

halotroop2288 commented 4 years ago

I have done some more looking into the original implementaion in Vivecraft, and found that it uses an input simulator for mod compatability, which comes with many keybinds that seem far out of scope for a library.

I've pushed my changes up to this point, I'm looking for alternatives. Hopefully it's readable enough that you can see how the input calls work. Let me know if you have any suggestions.

P.S. Haptic feedback is already trivial to implement. I've done it myself already. :)