Can I play with joystick?

Would be insane.

There does not appear to be native support for joysticks. Some community members are working on a plugin, but for now there is this.

This is kind of a hacky work-around, but the problem is just that unreal wants xinput instead of directinput

I got joystick support working by using x360ce, available here: GitHub - x360ce/x360ce: Primary repository for the x360ce library, front-end and tools.

its basically an open source program meant to let off-brand gamepads emulate the brand-name xbox 360 controllers, but it does so by translating directinput to xinput.

This only works after you package the game to play in windows outside of the editor

  1. Set up project input axis to use the gamepad thumbstick axes
  2. After packaging the game, you should have a folder named somethings like ‘WindowsNoEditor’
  3. After downloading x360ce (in the appropriate 32 or 64 bit version) configure the inputs of your joystick to match the gamepad inputs you set up in step 1 look for youtube video on configuring x360ce

you should now have 3 files:
x360ce_x64 application
xinput1_3.dll
x360ce configuration file

  1. copy these 3 files into WindowsNoEditor>Engine>Binaries>Win64

Your joystick inputs should now work within your application.

This is by no means an ideal solution. I would really like to see native support from Epic.

I wrote a plugin using Simple DirectMedia Library (SDL). It is easy to use and also supports haptic behavior for force feedback devices.

Do you have a link Bumbala ? Would love to give it a try.

Here’s the plugin. SDL lib is not included, please download the development libraries for yourself from:

https://www.libsdl.org/download-2.0.php

Extract it under ThirdParty/SDL2-2.0.3 and add plugin to your project. Btw, SDL library supports haptic behavior but it’s not implemented in this plugin.

SDLJoystickPlugin.zip (24 KB)

The problem stems from Microsoft recommending the use of Xinput over DirectInput. I have several controllers, flight sticks, and racing wheels that I cannot use with UE4. The main problem with the DirectInput is the lack of standards for button/axis mapping and force feedback. I wrote a simple drop-in replacement for XInputInterface that works with a single gamepad with static button mappings, but the entire mapping process was trial and error. To make it viable, the editor would have to be extended to allow button and axis identification and splitting(gas/brake axis); and maintain a database of force feedback codes to send for each controller type. You will also run the risk of duplicating controllers by enumerating DirectInput devices, which also contains the XInput devices (which should use Xinput to maintain maximum compatibility.)

IMO, it would consume too many resources to develop a production ready implementation.