Hello,
I’m having some trouble with my WheelColliders. I have four on a vehicle that I want to turn right when it enters an area (or crosses a threshold).
The Car has the following move() method:
void Move()
{
RRWheel.motorTorque = 5;
RLWheel.motorTorque = 5;
Debug.Log(RRWheel.motorTorque);
Debug.Log(RLWheel.motorTorque);
if (collided)
{
if (collided.gameObject.tag == "TriggerWall")
{
FRWheel.steerAngle = 45;
FLWheel.steerAngle = 45;
RRWheel.motorTorque = 10;
RLWheel.motorTorque = 10;
collided = null;
}
}
}
The debug log shows that there is torque being applied the whole time, even after it stops moving.
I am calling Move() from the FixedUpdate() method.
Anyone have any thoughts?
Thanks,
Fred