Upbge: Joystick sensor not working on exported runtime build (bug)

Created on 5 Jan 2019  路  8Comments  路  Source: UPBGE/upbge

Since Blender version 2.63 the joystick sensors logic bricks for xinput controllers stop working when exporting project as game engine run time build, this makes impossible to publish games made with logic bricks that make use of joystick.

All 8 comments

have you tried setting up the joystick in upbge without Xinput?

I think SDL that @lordloki updated supports this out of the box (xbox controllers)

Not yet. Will try doing the SDL2 for my project soon, but It doesn't change the fact that there is a problem with joystick sensor. Hope they have good solutions for gamepads implemented soon.

I just test in windows with 0.2.4 and it is working perfectly.
Tested with viewport, blenderplayer and exported as runtime. Xinput controller (XBox360 for PC).
Which is your system? Upbge build? joystick?
What are the messages in the console?

I'm using the gamepad PG-9021, it works fine in the embedded and stand alone player, but not when exporting as runtime.
System is Windows 10 32x.
This is the error message:
https://drive.google.com/file/d/1PTgRg6q_CjeKqwDfWufP_n5DDRGbgJsx/view?usp=sharing

I think a quick solution would be copy gamecontrollerdb.txt where you have the .exe

Coping the gamecontrollerdb.txt to the .exe folder din't work.
But coping it's directory did: "2.79/datafiles/gamecontroller".
Changing the addon code to include this directory should solve it.

Also this makes me assume that any assets you're using from "datafiles" and "scripts" folder won't be exported too.

Yes, i saw that the datafiles and scripts folders are not copied. I will see how to fix it.
Thanks for testing.

Commited fix in UPBGE-Addons.
image
Thanks for reporting. Closing.

Was this page helpful?
0 / 5 - 0 ratings