Change Accelerate and Break on a Car to Triggers on Controller instead of Vertical on Analog Stick (

Hi everyone,

Trying to build a Go-Kart game for VR and making good progress but I can’t seem to find a way to change the controls on the car to be the triggers on a controller or Oculus touch controllers.

I have the free version of Vehicle Physics Pro and Paid version of Car Controller (owner is away until 22nd Dec so can’t ask them how to do it)

The car goes forward when I press up on any controller or W on keyboard, and breaks if I press back or D on keypad.

Example on Vehicle Physics Pro:

You need the Pro version which costs a few grand to get access to the Source Code to make changes so I can only use it the way it is now. Throttle and Brake Axis are on the same line and they say Vertical. I’ve tried changing it to a different Key to see if it would work and it doesn’t.

Any ideas?

Thanks

You need to figure out if the triggers on the controller are already handled as an axis or as individual buttons. If so, then you’d change the axis in the inspector from Vertical to whatever you want to call your trigger axis. You may have to create a new axis in the input manager for this. If they are handled as individual buttons, you might still be able to create an axis out of them (haven’t tried myself), or edit the script to take individual button presses instead of an axis.

How you’d do the last part depends on the script, but you can’t post someone else’s copyrighted code to the forum, so I’d ask the creator of the script if you can’t figure it out.