I want to have up to 2 or 3 slots for buttons to be rebound, its clearly possible as fortnite does it, but the current system for rebinding input is pretty terrible.
Remove then add axis mapping will move things around, removing a key mapping then adding another onto the end of the list.
Trying to edit the array from get axis input just doesnt work, as it passes a copy, not a reference, making editing completely impossible.
Its possible to store all mappings in the bp, editing what you want, deleting all input mappings, and then adding everything back, but do we HAVE to do it this way?
What is wrong with that? This is how I do it and it works nicely. It’s often useful to clear and update all mappings at once so that you can validate the list of mappings first (are they all assigned ? are there dupes?) before updating the controls entirely.
On the APlayerController you can directly access the PlayerInput property to get / set / clear mappings: