Announcement

Collapse
No announcement yet.

Joystick Support

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [FEATURE REQUEST] Joystick Support

    I know this is probably beating a dead horse, but could we please have joystick support for desktops?

    I've read every post I could find and the answers I've found are:
    - Use a plug-in... Ok, but I don't know that these plug-ins are kept in sync with the latest engine builds. I don't see any confirmation that they work with 4.10, for example. I don't necessarily trust a random user's plug-in code as much as I would trust it if it were actually a part of the engine. I think it's awesome that users are out there contributing plug-ins, but joystick support is a core feature of a game engine. It's really puzzling that something as AAA as UE4 doesn't have it.
    - Use x360ce... Everyone who suggests this prefaces the advice with "It's really hacky and doesn't work most of the time." So I think I'll pass on that one.
    - Use joysticks that support XInput... Yeah, great idea, except I can't really control which joystick the players of my game own. And what joysticks even fall in that category? I'm guessing it's just the XBox gamepads? So I have to put a warning on the game label that says "Playable with keyboard, mouse, or joystick ... as long as it's an XBox gamepad." Not sexy.

    And, of course, some threads suggest rolling your own. I think that's kind of absurd if you've already committed to using a game engine. Literally every other engine I've used wince Windows 95 has supported joysticks, including some incredibly crappy in-house engines.
    Level 17 The Ladon Device

    #2
    XInput is not just xbox controllers, it a library that replaced DirectInput in DirectX. Problem with XInput is that it's not USB HID compatible, they either need to act as xbox controller on hardware or require special driver (like universal x360ce), also Xinput compatible devices are practiclly only gamepads and arcade sticks... main reason why is fact that joysticks are not popular anymore. Problem with USB HID on other hand is fact that it only supports axis and buttons, they are also visible as unstandarised numbers so you can't identify specific buttons as well as with axis you nto sure if you deal with joystick or 2nd anolog stick or trigger button analog, there is also 0 support for vibration as well as motion controls (which XInput also don't support either way ), thats why on Windows it's hard to find games that support USB HID devices.

    Which bring us to fact that Xinput only games are very common practice in Windows games, aspecially in Steam exclusive games, so i think you should not be really worried about because users (as well as hardware producers) that do use gamepads on PC are fully aware of that problem.... or else you really want to use real deal classical joystick. On bright side, USB HID devices will work on Linux, as UE4 using SDL joystick support for it, which use standard kernel drivers which supports USB HID and Xinput devices as well as other propietery solutions (like PS3 controller... which is odd USB HID device with incompatible init command) out of the box, in not sure about Mac but my guess it also should work with with HID. So yeah, i guess it's all M$ fault by making this wall dividing devices
    =========
    My Tutorials:
    Basic knowledge about Classes and UObject environment and stuff like that

    Comment


      #3
      Originally posted by Shadowriver View Post
      On bright side, USB HID devices will work on Linux, as UE4 using SDL joystick support for it
      So... why not use SDL's joystick support on Windows?
      Level 17 The Ladon Device

      Comment


        #4
        Thanks for bringing this up Pat-Level17, I also have been experimenting with the plug-in, I was able to get it working on my development level, but had difficulties building it into the exe. Going to try again over the Christmas break.

        Comment


          #5
          Jim -- Cool, if you find a decent solution that is fairly cross-platform-friendly, please post to the forums. There are a lot of us who would find it very useful.

          I've thought about various ways of approaching it, but I just really dislike having to modify and rebuild the engine code. A plug-in is probably the best solution, but I haven't paid close attention to whether or not any of the existing ones work (well). I guess I'm in the minority, but I own a plain old joystick and a lot of the guys messing around with my game do, too.

          Also, Merry Christmas to all you gamedev bros!
          Level 17 The Ladon Device

          Comment


            #6
            Originally posted by Pat-Level17 View Post
            Jim -- Cool, if you find a decent solution that is fairly cross-platform-friendly, please post to the forums. There are a lot of us who would find it very useful.

            I've thought about various ways of approaching it, but I just really dislike having to modify and rebuild the engine code. A plug-in is probably the best solution, but I haven't paid close attention to whether or not any of the existing ones work (well). I guess I'm in the minority, but I own a plain old joystick and a lot of the guys messing around with my game do, too.

            Also, Merry Christmas to all you gamedev bros!
            Pat - There's a plugin out there that actually works with 4.10.1 right out of the box:

            https://forums.unrealengine.com/show...k-Plugin/page3

            It is far from perfect but would probably help you out quite a bit.

            The documentation on the github page is outdated so be sure to read the updated info on the plugin:

            https://forums.unrealengine.com/show...l=1#post227106

            It hasn't been updated in months, but I'm working on a customer VR controller project and will probably do a fork here shortly.

            Comment


              #7
              I for one would like to see official joystick support as well. Where xinput covers mainly gamepads, there are still lots of devices for more niche genres that are not supported. Current implementation leaves out for example almost all steering wheels, flight sticks and other sim related controllers.

              I'm aware of the plugins out there but they need to be constantly updated and some of them have major issues that have never been solved. I feel that these kind of things take devs efforts away from developing their games as they have to implement/fix things that engine should provide them.
              https://github.com/0lento/UnrealEngine (GameWorks tech merges & upgrades, UE4 physics modifications)

              Comment


                #8
                For people who want to take a look at current plugins:

                This is probably the most used and forked plugin/thread for unreal:
                https://forums.unrealengine.com/show...oystick-Plugin
                you can find DirectInput and SDL based plugins on that thread. You can also see all the forks here:
                https://github.com/Ikarus76/UEJoystickPlugin/network

                For logitech wheels with FFB:
                https://forums.unrealengine.com/show...ugin-available
                https://forums.unrealengine.com/show...g-wheel-plugin
                https://github.com/0lento/UnrealEngine (GameWorks tech merges & upgrades, UE4 physics modifications)

                Comment


                  #9
                  Pat-Level17, will do.

                  I will try to make step by step instructions if I get it to work and post it here.
                  Been wrapped up the last two weeks working/testing Quaternions code changes in UE4 and becoming more familiar with the UE4 editor/MSVC 2015. Now just working on how to share my compiled code with my art/BP devs. Once I finish that I can get back to figuring out the Joystick problems and I will try out the links above posted by 0lento and wspracklin.

                  UE dev for ~3 months, but I am loving it, this engine is pretty @#$% powerful; great job EPIC!

                  Jim

                  Comment


                    #10
                    I wouldn't hold any hope for Epic adding generic controller support, since the built-in input system refers to controller features by names that wouldn't make any sense on controllers with arbitrary layout. It's clear that they made the call to go all-in with xinput.
                    In light of that, I made a plugin: https://www.unrealengine.com/marketplace/controlysis
                    Very simple to use, even works in non-code projects. I'm committed to supporting it indefinitely.

                    Comment

                    Working...
                    X