Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Option to manually assign an axis or button to an input #19

Open
gegentan opened this issue May 8, 2024 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@gegentan
Copy link

gegentan commented May 8, 2024

OS: Ubuntu 24.04
Minecraft Version: 1.20.1
Mod version: 1.2.4

I have a PS4 controller connected via bluetooth to my pc

In controller configurations, when i click right/left trigger the red lines light up instantly and in the config menu next to those buttons the "Output value as axis" instantly changes from 0.000 to 1.000 even when barely touching the trigger. Using PS4 controller test websites works (the trigger value is correct)

image

Screencast.from.2024-05-08.19-12-20.webm
@getItemFromBlock
Copy link
Owner

getItemFromBlock commented May 8, 2024

So in the menu you can see that the mod detected the trigger inputs as buttons, and not as axis (see the name of the input)
This means that GLFW expose this input as a button, which seems to sometimes be the case with theses controllers (I had the same issue a while ago with a similar controller)
So here I can't really do anything, since I can't modify GLFW. It is possible that GLFW expose the triggers as both axis and buttons, in which case the mod detects the button change first. If that is the case, you can try to bind the axis by having your trigger slightly pushed before clicking on the bind button, then pushing completely the trigger down so that the "fake" button is already down.
Some rework of the button binding for this are planned, but theses will probably not come before this summer.

@getItemFromBlock
Copy link
Owner

Also, if GLFW detects your controller's shoulder axis as buttons only, then I can't really do anything since its an issue with GLFW, which I don't have control over (btw GLFW is an external library that Minecraft uses for handling inputs)

@getItemFromBlock
Copy link
Owner

getItemFromBlock commented May 8, 2024

If that is the case, you can try to bind the axis by having your trigger slightly pushed before clicking on the bind button, then pushing completely the trigger down so that the "fake" button is already down.

Ok so I tested this because I wasn't sure if it would work, and it does not.
I made a test profile with some edited values, based on what I could see from yours
gamepad_profile_0.zip
You can try to replace your current profile with this one
To do that, unzip the above file and place its content in the config folder of the mod: .minecraft\config\gamepad_profiles folder (you might need to change the path if you use another folder for your game)
In the gamepad_profiles folder there should be already a gamepad_profile_0 file, so make sure to replace it with the one in the zip. (you can make a backup of it just in case)

Tell me if that help

@gegentan
Copy link
Author

gegentan commented May 9, 2024

It worked! Thank you!

Screencast.from.2024-05-09.12-02-36.webm

@getItemFromBlock
Copy link
Owner

Alright, good to know that it worked for you
I will leave this open, but rename it as a feature request for the improved UI that should come with the next big update

@getItemFromBlock getItemFromBlock changed the title Not detecting right/left trigger input value (instant 0.0 -> 1.0) Suggestion: Option to manually assign an axis to an input May 9, 2024
@getItemFromBlock getItemFromBlock changed the title Suggestion: Option to manually assign an axis to an input Suggestion: Option to manually assign an axis or button to an input May 9, 2024
@getItemFromBlock getItemFromBlock added the enhancement New feature or request label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants