Question by
WeAamBaSSem · May 01, 2021 at 06:09 AM ·
unity 5wheelcollider
Wheel Collider
Hi threre! when I use Wheel colliders without using brakeTorque it works fine but when I add brakes the car doesn't move at all
float breakforce = 50;
bool movementeneable;
void HandleMotor () {
brakeforce = 0;
float movementeneable = enableMove ? 1 : 0;
Wheel_1.motorTorque = movementeneable * MotorForce;
Wheel_4.motorTorque = movementeneable * MotorForce;
if (!enableMove)
{
brakeforce = 50;
Debug.Log("break");
Wheel_1.brakeTorque = 50;
Wheel_2.brakeTorque = 50;
Wheel_3.brakeTorque = 50;
Wheel_4.brakeTorque = 50;
Wheel_5.brakeTorque = 50;
Wheel_6.brakeTorque = 50;
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613033117im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
motorTorque keeps on being applied 1 Answer
good setting for WheelCollider 0 Answers
Wheel Colliers sinking into ground 1 Answer
WheelColliders problem 1 Answer
Problem in steering with wheelcolliders 0 Answers