Is setting up 40 input axes a good idea?

So, I want in-game custom controls with either mouse and keyboard or any controller/joystick. I think I’ve figured out a solution. I will set up 40 axis imputs in the input manager (10 axes on each joystick, 4 joysticks). That way i can use a combination of GetAxis() and KeyCode to take input from anywhere. Then I will use a lot of custom Javascript to set up my own input management system (most likely will use a lot of PlayerPrefs to save it all).

If any part of this is a bad idea or there’s an easier way, please let me know. It would be much appreciated :slight_smile:

(This crazy “40 axes” idea is due to the fact that I can’t figure out how to gain access to any axis without using the input manager. Also as far as I know, there’s no way to edit the input manager at runtime.)

That’s what we did for KSP. All input axes in the input manager are given standard parameters and a unique name that gets saved to the game settings.

When you map an axis, we listen to movement on all of them, and select the first one to get deflected past some threshold.

Then we have a wrapper class that we use in game to query the axis, instead of using Input.GetAxis directly.

It’s the only way that I know that works to have in-game mappable axes. AFAIK, the InputManager tools aren’t exposed to runtime code.

Cheers