WheelCollider motorTorque acceleration with ps4 triggers
Hi there,
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.
Your answer
Follow this Question
Related Questions
How to calculate car braking force (using wheelcollider)? 0 Answers
How to make a race car 0 Answers
Wheel Collider problem 1 Answer
How to make handbrake turn or powerslide with wheel colliders? 0 Answers
make enemy cars spawn faster over time! 2 Answers