In-Game Controller Question

Hi,

I’m working on a game, which is going really well, however I have a niggling issue which is really starting to annoy me…

When I test the game using my Speedlink USB Gamepad, the fire button is mapped to button 3. This is the number which is printed on the button, and it is the physical equivalent of the green “A” button on an X-Box 360 wired gamepad.

When I test the game using the XBox controller the fire button becomes the blue “X” button. Not that big an issue, maybe, but it is annoying me.

My question is can anyone tell, or preferably show me a way to set up the controller in game. I use the left analog stick and will need to be able to map two buttons. Fire and quit.

Ideally, what I would like is a couple of buttons that say “Click here to configure the Fire button” and “Click here to configure the Quit button” and when you click on them you can then press whichever button you want to use and it will set and remember your choice.

Thanks in advance,

John.

bump anyone?

Don’t know if this clarifies the question. Can anyone help? This is really starting to be a pain!

Take a look at this one for remapping GitHub - daemon3000/InputManager: Custom InputManager for Unity

Without custom implementation of InputManager axis override it’s impossible to do key remapping in runtime.
As for the buttons changing on their own - it’s really weird.

1 Like

Thanks a lot for that, VergilUa, I’ve had a quick look, and there are a couple of bits there which look like they will definitely point me in the right direction.