I'm fairly new to Unity and i'm struggling to find some answers. Every car script and wheelCollider tutorial I can find is based in the horizontal and vertical axis and that works great. But I'd like to move the car while holding a trigger and brake the car while holding another trigger (ps4 controller. Inputs are already mapped and working), but I need some help on that.
This is the part of the script that handles the acceleration:
float motor = maxMotorTorque * Input.GetAxis("Vertical");
foreach (AxleInfo axleInfo in axleInfos) {
axleInfo.leftWheel.motorTorque = motor;
axleInfo.rightWheel.motorTorque = motor;
}
Is there anyone that can point me in the right direction or possibly provide some example scripts?
Thanks in advance.