Wheel Collider on different surfaces?

I’m working on a race car game and have a car body which has Rigid body component and also wheel objects which have wheel collider components. The ground has Physic material on it’s collider.

How can I make the car slow down based on the ground’s friction when there is 0 motor and brake torque? Shouldn’t the ground’s friction automatically affect the car?

No, WheelColliders aren’t affected by the physic materials of the colliders. You have to use a different approach to slow the car in those cases:

  • Increase the Rigidbody’s drag property
  • Apply drag forces with AddForce in the position of the wheels

You can detect the collider touched by each WheelCollider using WheelCollider.GetGroundHit. The collider is WheelHit.collider.

1 Like

Ok, thank you. I will try this approach :slight_smile:

1 Like