daemon3000 / InputManager

Custom InputManager for Unity
Other
587 stars 88 forks source link

Convert a joystick axis(the trigger) to a button(Fire1) #6

Closed Elit3d closed 9 years ago

Elit3d commented 9 years ago

Currently there is no way to do this. Would be really cool to bind axis to button. Lets say Fire1 was RightTrigger and I wanted to bind it to A, this currently cant be done

rbozan commented 9 years ago

You could do this, if you make the Fire1 button in your default configuration an axis. If you make "positive" to Fire1, and set sensitivity to 1, and change InputManager.GetButton to InputManager.GetAxis, you basically got that working..

daemon3000 commented 9 years ago

This is now supported through a new input type named AnalogButton. The RebindInput script that comes with the controls menu example shows how to use it. To test it run the controls menu example, go to Controls > Edit Gamepad and try to bind an axis to the Jump button.