JaydenMaalouf / JoystickPlugin

Native Input Joystick Plugin for Unreal Engine 4/5
MIT License
34 stars 6 forks source link

Joystick Plugin + Enhanced Inputs key assignment error #64

Open KeinEngelZlat1992 opened 8 months ago

KeinEngelZlat1992 commented 8 months ago

Good day to all! The problem is as follows: to create a control system using the Enhanced Inputs plugin, I create an Input Mapping Context and 2 inputs for each action, I set both inputs as the 1D Axis (2 pedals are connected - throttle and brake). a474596dda30a2bb7e4b9fc0cf8b081cad04f207 Then I go to IMC and try to assign axis data via the button next to the drop-down list (highlighted in the screenshot), but the same axis is assigned to different actions (see screenshots). 8f3077c4b30f3975cb785c3e1829064f2e7174c9 And this happens with any device except the keyboard, but I don’t need keyboard control at all. What could be the problem? Yes, of course, you can set the axes manually, through a drop-down list, but I need the axes to be determined automatically. In the future, I will need to make a menu for reassigning keys, but through the Input Key Selector (and through the Joystick Input Selector) the same problem occurs, the same axis is assigned to all actions. If you need any log files, screenshots, additional information, then I am ready to provide it.

KeinEngelZlat1992 commented 8 months ago

Maybe you need to install some additional SDKs? For example, DirectX SDK or Windows SDK? I just haven't been able to reassign the axes for a month, and this is holding back the creation of the project.

JaydenMaalouf commented 8 months ago

You don't need any additional SDKs to use this plugin Out of curiosity, can you please provide some logs from project startup to when you assign the axis? I suspect that there could be a key name conflict

JaydenMaalouf commented 8 months ago

Also, which version of the plugin are you using?

KeinEngelZlat1992 commented 8 months ago

@JaydenMaalouf I understood what the problem was, but I don't know how to solve it: when selecting Inputs, the base value changes from -1 to 1, respectively, ue5 perceives as if the axis was initially pressed, and does not allow us to assign another axis, since it believes that we have already pressed a certain axis. When assigning buttons, everything is fine, the problem is only when assigning an axis. Is there any way to set the initial value of the axis to be 0 instead of -1? And where can this be done: in the engine itself, or in your plugin, or in Enhanced Inputs?

Plugin version 3.3.0. Regarding the provision of the log, I can send an archive with a test project via file sharing (Google drive).

JaydenMaalouf commented 8 months ago

@JaydenMaalouf I understood what the problem was, but I don't know how to solve it: when selecting Inputs, the base value changes from -1 to 1, respectively, ue5 perceives as if the axis was initially pressed, and does not allow us to assign another axis, since it believes that we have already pressed a certain axis. When assigning buttons, everything is fine, the problem is only when assigning an axis. Is there any way to set the initial value of the axis to be 0 instead of -1? And where can this be done: in the engine itself, or in your plugin, or in Enhanced Inputs?

Plugin version 3.3.0. Regarding the provision of the log, I can send an archive with a test project via file sharing (Google drive).

There is a way to remap the inputs in the Joystick Plugin settings (should be under Project Settings) In there, you can override by a specific device ID or by all devices (by setting the guid to all zeroes). I mainly use the min/max remapping to remap it from -1:1 back to 0:1