-
-
Notifications
You must be signed in to change notification settings - Fork 96
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 support for force feedback in steering wheels #8309
Comments
I support this in principle, but I have similar concerns as #2829. Is it possible to reasonably support the majority of steering wheels out there without needing lots of maintenance work on our end, considering there are no plans to use SDL in its entirety? This requires OS-specific code after all, as evidenced by your use of DirectInput and ioctl. It has been discussed that we could copy SDL's input code where relevant and using it in Godot to support things like #2829, but this is still challenging to do (and keep up-to-date with newer SDL versions). Edit: Using SDL only for input could also be an option. |
@Calinou thanks to answer. Both ioctl and DirectInput is out of date, with bad documentation, that bring some technical deficit. I will study more about SDL2 to copy code and continue feeding my branch. Who need this feature could just download it. |
@x-channel What do you mean by "ioctl is out of date"? On Linux, ioctl is the generic interface every supported wheel uses. No need to use SDL. SDL acts just as a wrapper for ioctl. I see we're already using ioctl for the rumble effect in gamepads, so it would only need to be extended for more effects. I don't know about Windows. DirectInput provides generic FFB support but I don't know if it's really out of date. Many games still use it so I'm not sure if it's out of date or it's just not the newest API. I quick look at UWP and it seems that generic FFB it's included. I don't think SDL is needed for this, the same way it wasn't needed for vibration in gamepads. |
It looks like we may be switching to SDL for input in the long run anyway, since it fixes a lot of issues with gamepads: godotengine/godot#87925 |
@x-channel is there any update on the topic, I'm currently trying to implement force feedback as well in my demo. Perhaps your code could be put into a module to make the feature available? |
Hello Simon, there not way to turn It in separated module. My proposal is Just update in input module for produce less junk and keep ALL haptics in same module. Them both vibration and Constant force belong tô same namespace. Now i don't remember each module that i rewrite. But you could find It If you compare filé sizes from my version with same file from official version. |
Describe the project you are working on
I'm start to project game where you travel in Pernambuco's countryside.
I already write godot flavor with force feedback. It work on windows and linux, with respective direct input 8 and ioctl for linux. I published branch and example on itch.io. 6 people downloaded it.
https://cairerocha.itch.io/godot-force-feedback-example-ffb
Describe the problem or limitation you are having in your project
The game engine can't apply force in logitech G29 device.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add input methods to apply force, like rumble in xbox controller.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If this enhancement will not be used often, can it be worked around with a few lines of script?
Dechode already tried it, but there several issues in this approach.
Dechode
/
Godot-FFB-SDL
Is there a reason why this should be core and not an add-on in the asset library?
There will be nice if someone can run it as add-on, but gdscript can't acess this.
The text was updated successfully, but these errors were encountered: