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

Add example for device that supports InputEventJoypadButton's pressure property #8549

Closed
stephanbogner opened this issue Dec 1, 2023 · 6 comments · Fixed by godotengine/godot#87676
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement

Comments

@stephanbogner
Copy link

Your Godot version:

Not relevant

Context

In my game I want to support as many controllers as possible so I want to know what I have to look out for / test with.

Issue description:

The docs for InputEventJoypadButton > pressure states Represents the pressure the user puts on the button with their finger, if the controller supports it.
I have never heard of a button that also detects pressure (which is not a trigger). A note on which device / types of devices this exists would be helpful.

Maybe this is supported by less-common devices like fancy midi-keyboards / drawing tablets? 🤔

PR

I am happy to phrase the sentence and open a PR once I know what devices/buttons this refers to.

URL to the documentation page (if already existing):

https://docs.godotengine.org/en/stable/classes/class_inputeventjoypadbutton.html#class-inputeventjoypadbutton-property-pressure

@Piralein Piralein added the area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository label Dec 2, 2023
@Mickeon
Copy link
Contributor

Mickeon commented Dec 30, 2023

I have never heard of a button that also detects pressure (which is not a trigger). A note on which device / types of devices this exists would be helpful.

It's not novel. Most of the buttons on the Playstation 2 & 3's controller are pressure-sensitive, but it was relegated back to only the back triggers because the feature was fairly underutilised. Unfortunately, I do not have those controllers to test them, but this is is what they are referring to.

@stephanbogner
Copy link
Author

@Mickeon Oh wow! I even had a ps3 and can't remember any game utilizing it.

I still have it at my parent's place. If it still works I am gonna try it out and make a PR (so even younger generations know what this refers to 😅).

Thanks for giving an example.

@stephanbogner
Copy link
Author

This was much harder to check then I expected.

On Mac:

  • I couldn't get the PS3 controller to work

On Windows:

  1. I could get the PS3 controller (Sony Dualshock 3) to work through DsHidMini x64 (driver chart which shows support for pressure sensitive buttons)
  2. I then used the HID device mode SXS which supports pressure sensitive buttons
  3. I installed the Playstation 3 emulator RPCS3 and used the "GamePad Test homebrew" to verify that pressure sensitive buttons are working properly
  4. Unfortunately Godot still shows pressure=0.00 😔 ... so I am not if it's a Godot bug or some driver issue

PS: I found an interesting video about "The Short History of Pressure Sensitive Buttons" with a great example about Metal Gear Solid utilizing it.

@stephanbogner
Copy link
Author

stephanbogner commented Jan 26, 2024

Even if I couldn't get it to work, we could still update the docs with something like:

Ranges from 0.0 to 1.0. Represents the pressure the user puts on the button with their finger (if the controller supports it). Nowadays not a common feature but present on gamepads such as the Sony Dualshock 2 & 3 or original Xbox controller.

@Mickeon
Copy link
Contributor

Mickeon commented Jan 28, 2024

I asked on RocketChat about this and it's pretty amusing to me.

In a nutshell, this property has existed ever since Godot became open source. But as it turns out, it was never implemented at all, at least on Windows. Joypad drivers do not use it. It should not exist at all. It probably went completely unnoticed for how obscure this feature is. Requesting this feature nowadays would probably be a good proposal. But the description absolutely needs to change now.

@stephanbogner
Copy link
Author

stephanbogner commented Jan 28, 2024

@Mickeon
Haha, that is funny indeed.

It was an interesting rabbit hole though. Now I am actually kinda sad, that that feature is gone from the gaming world basically forever (not because of Godot but because of controllers not having it anymore).

Thanks for asking around ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:class reference Issues and PRs about the class reference, which should be addressed on the Godot engine repository enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants