SimpleCotroller Questions and Support

That seems easy to me as well. One question here, it is very genuine. DOes mapping profile works based on Device ID? So for instance I have Input Move, I had Mapped it foe Device ID 0 with the Axis 1. Now If I use Device ID 1 and press something(any button that might be the same axis regardless of Device ID). What would be the scenario then? In my mind this scenario is not possible but you can tell me better than anyone

The DeviceID is a consecutive number that comes from SDL. If you connect a device, it gets the DeviceID 0. If you disconnect and reconnect the device, it gets a 1 and so on.

I have added the ConnectionIndex. The order is decisive here. The first device gets a 0, the second a 1 and so on. If a device is disconnected and reconnected, it gets the next free number.

The mapping runs via the ConnectionIndex. Unfortunately, there is no unique serial number or anything like that for controllers.

Exactly. Now Imagine 2 devices, Connection Index 0 and 1. I have mapped Move Axis on Connection Index 0: Axis 1. I have not disconnected or anything. Now if, Move Axis 1 on Connection Index 1, what will happen then? Considering I have done loading of mappings like you suggested.

Nothing should happen. If connectionindex 0 is in the mapping, inputs from connectionindex 1 are ignored.

Hello!

I have set up the Simple Controller Plugin successfully in my game, but when I package the game I get this error.

I looked through the trouble shooting documentation and realized I don’t have the SDL2.dll in my binaries folder. I assume that is causing the problem, if you know what is going on I would love some help with it.

This plugin is AMAZING by the way!

With a normal Windows installation, you will find the plugin in the ”
Engine\Plugins\Marketplace” directory. You will find the dll in the “Binaries\Win64” directory of the plugin and can copy it to “Binaries\Win64” of your porject. If you cannot see the dll, check your Windows settings. Normally the dll is copied during the build. After creating a build, search for “sdl” in the logs or in the output log window. I would be interested to see if there is an error message.

1 Like

Yup, that fixed it! Thanks for the reply!

When I package the project, I get this message, a warning about the missing dll. But it does go away as expected when I copy the SDL2.dll file to the project.

UATHelper: Packaging (Windows): SimpleControllerPlugin: Expected SDL version. Windows: 2.29.0 Mac: 2.28.5
UATHelper: Packaging (Windows): SimpleControllerPlugin: SDL2.dll not found (Only important on project cooking): C:\Users\silas\OneDrive\Documents\Unreal Projects\Leap_of_Faith\Binaries\Win64\SDL2.dll

Hm, but the dll was in the binaries directory of the plugin? Should actually be copied into the project automatically when a project is started. Which Unreal version?

I am using UE5.4.4

I think I’ve found the reason. In the past, the directory was always called the same as the plugin. Since Fab, Epic seems to name it differently for each engine version. I need to customize the plugin. Sorry for the inconvenience, I didn’t notice it.

1 Like

Haha, Fab is causing all sorts of issues! Glad to hear you found out the issue. I will happily download that update when it comes out! :fire:

How do I make this work on Multiplayer? I am calibrating and using a component from which I get axis value or action value?

You can use the connection index variable to differentiate between the controllers and connect them to the players. However, I can’t say anything more detailed without knowing how your game works.


This is a part of BP_InputComponent. I bind these event dispatchers in my Pawn class. Now these does not work when I am in Multiplayer Environment

By “multiplayer” do you mean network/online multiplayer? You have to make sure that the plugin functions are executed on a client. If you make a print string in your blueprint. Does it say client or server in front of it?

Yes a networked game. And I am not doing anything. Do I need to call From Server to Owning Client?

No, you just have to make sure that the Blueprint class is executed on the client. Controller inputs on the server make no sense. When you start a network game in Unreal, some blueprint classes are split up. Some then only run on the server, some only on the client and some on both. You can see this with a PrintString. You then have functions such as “Has authority” and “Is locally controlled” to control this.

Think about what it would look like in reality with a build. A player then only runs your game once on a PC. But during development you have client and server on one PC. Maybe even two or more clients. You may have to create two paths. One for development and testing and one for actual use. But that depends on the game. In Fifa, all controllers are listed and you can select a team by pressing left or right. In Street Fighter you have to press a button and then the controller is assigned to the player. I don’t know how it is in your game.

By “Blueprint Class executes on client” do you mean, the BP_InputComponent that I have made? And for it to be activated everytime I am now using Auto Activiate

I can’t tell you. Just make a PrintString with “Hello” after Begin Play in your Blueprint. It should then show “Server: Hello” or “Client: Hello”.

I would add the plugin functions to a widget once. For example, for the mapping. And then perhaps in the player character blueprint with “Is locally controlled” in front of it.

Hello , im using this plugin and its very great the unique problem i saw for now the CSL DD doest work , any solutions on that?