Do a Barrel Roll

Do a Barrel Roll

6M Downloads

[Feature Request] Rebinding axes (and maybe motion control integration)?

SusStew opened this issue ยท 11 comments

commented

Currently pressing A/D moves your player's yaw, the mouse's X-axis is roll, and the mouse's Y-axis is pitch. It would be nice if you could, for example, rebind A/D to roll and mouse X to yaw. This may be more intuitive for some. Another use case for this is that I'm using a program (JoyShockMapper) to use this with a game controller's gyro, and I could use it and bind each real-world axis to the corresponding in-game axis.

commented

Although this still wouldn't fix the controller use case because the controller's roll is not actually used as a full axis, it can only be used to press A or D. The only true fix to this would be a mod that can access the controller's gyro from within the game. Rebinding axes would still be helpful though.

commented

Since JoyShockMapper can bind motion controls to a virtual thumbstick, and that MidnightControls can use the analog input from thumbsticks, binding an axis to a thumbstick could work.

commented

I was just thinking about using midnight controls and an xbox controller with this mod

commented

In theory, pitch and roll should work with MidnightControls already, but I'm definitely interested in making yaw work with it as well. I have no idea if it provides an API for this I could use, but I'll look into it.

In terms of remapping the axes, I dont think full remapping capabilities are needed. Adding a config toggle to switch the roll and yaw axes should work for most usecases right?

commented

So quick update, MidnightControls does have an API, but it looks to be completely undocumented. Because of this I havent been able to figure out how to bind axis controls.

I've contacted the dev about this but I'll have to wait for a response before I can continue.

commented

I've tried using pitch and roll with MidnightControls, but it doesn't work. It seems like it's trying to turn the camera like it's using vanilla elytra.

Toggling between roll and yaw should also be all that's needed, yes.

commented

Yea, I tried MidnightControls as well and can confirm it doesn't work properly. Looking at the code, this is because they completely bypass the vanilla changeLookDirection method in favor of directly modifying the player rotation, thus bypassing my changes as well. Luckily this should be easily fixable on my side.

I haven't heard back yet on how to use the API, so that part is still on hold for now.

commented

Maybe there's more information in the LambdaControls (what it's forked from) repo?

commented

Just checked, there's a wiki but its not very useful for what I'm trying to do. The readme doesn't mention API usage either...

commented

I've been looking at the MidnightControls' code and from what I can tell, the option to make custom axis bindings doesn't exist. At this point I'm going to try just bypassing the API with a mixin to get the values I need.

commented

Controller compat and an axis switch toggle added in 1.1.0.