Announcement

Collapse
No announcement yet.

DirectX DirectInput Manager with Force Feedback Support

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

    [PLUGIN] DirectX DirectInput Manager with Force Feedback Support

    Hi Guys
    We're currently working on a customer project with the requirement to provide Force Feedback using the old Microsoft DirectX DirectInput Interface.
    This allows our customer to create custom Force Feedback Effects for various type of devices still using this technology (which are still quite a lot, especially in the flight simulation scene).

    Currently we are in a very early stage of the plugin, but it's already usable for a "proof of concept" or to explore the technology behind. Unfortunately, we had not time to write the documentation yet, so you should have experience with DirectInput Force Feedback to understand how they work or you have to check the Demo Project Control Panel to see how it was implemented.
    For more Information you can also refer to the MSDN DirectInput Force Feedback documentation.
    We’ll include a proper documentation with a couple examples in future.

    Here you can find a test Blueprint project including the plugin: http://www.mediafire.com/download/v2...hicleBPTest.7z
    Press “Enter” to see the Control Panel within the Game. Here you can see a couple of basic effects.

    I’ll try to keep this post up-to-date. Any feedback will be much appreciated.

    Best regards
    Bix
    Last edited by Bix1o; 11-20-2016, 09:40 AM.

    #2
    I tried the plugin but I can't control the car with the Logitech G27 wheel.

    Comment


      #3
      thanks for your feedback. Do you see any messages in the output log like this?

      (plugin creates a log entry for each created axes and button key map)

      DirectInputPluginLog: FJoystickPlugin::StartupModule() starting Joystick Devices....
      DirectInputPluginLog: FJoystickPlugin::StartupModule() starting DirectX DirectInput....
      DirectInputPluginLog: Initialize DirectX DirectInput System
      DirectInputPluginLog: Created DirectX Device SideWinder Force Feedback 2 Joystick
      DirectInputPluginLog: Joystick plugged in and configured: Id 0 Name SideWinder Force Feedback 2 Joystick
      DirectInputPluginLog: Create Axis Mapping Key for Joystick SideWinder Force Feedback 2 Joystick Axis 0
      DirectInputPluginLog: Create Axis Mapping Key for Joystick SideWinder Force Feedback 2 Joystick Axis 1
      DirectInputPluginLog: Create Axis Mapping Key for Joystick SideWinder Force Feedback 2 Joystick Axis 2

      Comment


        #4
        My output log looked like this:

        DirectInputPluginLog: FJoystickPlugin::StartupModule() starting Joystick Devices....
        DirectInputPluginLog: FJoystickPlugin::StartupModule() starting DirectX DirectInput....
        DirectInputPluginLog: Initialize DirectX DirectInput System
        DirectInputPluginLog: Created DirectX Device Logitech G27 Racing Wheel USB
        DirectInputPluginLog: Joystick plugged in and configured: Id 0 Name Logitech G27 Racing Wheel USB
        DirectInputPluginLog: Create Axis Mapping Key for Joystick Logitech G27 Racing Wheel USB Axis 0
        DirectInputPluginLog: Create Axis Mapping Key for Joystick Logitech G27 Racing Wheel USB Axis 1
        DirectInputPluginLog: Create Axis Mapping Key for Joystick Logitech G27 Racing Wheel USB Axis 2
        DirectInputPluginLog: Create Axis Mapping Key for Joystick Logitech G27 Racing Wheel USB Axis 3
        DirectInputPluginLog: Create Axis Mapping Key for Joystick Logitech G27 Racing Wheel USB Axis 4
        DirectInputPluginLog: Create Axis Mapping Key for Joystick Logitech G27 Racing Wheel USB Axis 5
        DirectInputPluginLog: Create Axis Mapping Key for Joystick Logitech G27 Racing Wheel USB Axis 6
        DirectInputPluginLog: Create Axis Mapping Key for Joystick Logitech G27 Racing Wheel USB Axis 7
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0
        DirectInputPluginLog: Create POV Mapping Keys for Joystick Logitech G27 Racing Wheel USB POV 0

        I got messages in the log file that looked like this:

        LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
        LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png
        LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
        LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png
        LogStreaming:Warning: Failed to read file '../../../Engine/Content/Editor/Slate/Common/Selection_16x.png' error.
        LogSlate: Could not find file for Slate resource: ../../../Engine/Content/Editor/Slate/Common/Selection_16x.png

        Comment


          #5
          ok great, that means the plugin did properly find your device.

          Did you bind the Axis and Action Mapping through the Input Settings in the Project settings editor?:
          (Demo Game hasn't configured any mapping, since FKey change with every device. Input Mapping at project level or a dynamic input mapping system within the game is needed to process input.
          Within the Demo Game you can press "Enter" to see a special menu with some test Force Feedback effects)

          Click image for larger version

Name:	input.png
Views:	1
Size:	212.9 KB
ID:	1107416

          p.s. A proper documentation of the plugin will be online in a few days.

          regards

          Comment


            #6
            How can I use the plugin in other projects?

            Comment


              #7
              it should work if you just copy the Plugins\DirectInputPlugin folder into your Game Project Plugins folder. At the moment you can use it only in blueprint only projects. (C++ support will follow)

              Comment


                #8
                Thank you very much for helping me copy the plugin to my game project. I can drive the van in my driving game using my Logitech G27 wheel.

                Comment


                  #9
                  thanks too for your feedback.

                  Comment


                    #10
                    The plugin isn't compatible with UE 4.12 which is released today.

                    Comment


                      #11
                      Help! This error pops up! My ue4 version is currently 4.9
                      [ATTACH=CONFIG]102408[/ATTACH][ATTACH=CONFIG]102408[/ATTACH]

                      Comment


                        #12
                        Originally posted by OMSUNE View Post
                        Help! This error pops up! My ue4 version is currently 4.9
                        [ATTACH=CONFIG]102408[/ATTACH][ATTACH=CONFIG]102408[/ATTACH]
                        Update to 4.12 then compile the plugin.

                        For compilation, you need VS2015. Create a new C++ class, and UE4 will open VS2015 for you. On the right hand side, select UE4, then go to menu and select "Build UE4". VS2015 will compile the plugin for you, and you should be able to run UE4 with the plugin after that.

                        Comment


                          #13
                          Hi, please find here the latest compiled binaries for UE 4.12.5.

                          Plugin: http://www.mediafire.com/download/8r...gin_4.12.5.zip
                          Demo-Project: http://www.mediafire.com/download/f2...est_4.12.5.zip

                          any feedback is much appreciated.
                          regards
                          Last edited by Bix1o; 07-24-2016, 06:26 AM.

                          Comment


                            #14
                            The plugin works perfect in the editor,it helps me a lot,I really appreciate it.But errors occur when I package the project, how to deal with the problem?

                            Comment


                              #15
                              The far I got was getting the wheel shaking =[

                              Comment

                              Working...
                              X