Unity 4 – Experimenting with Cars

September 05 / 2014

Followed this tutorial

http://forum.unity3d.com/threads/basic-to-advanced-car-or-vehicle-tutorial.86703/

Some things to keep in mind that was not mentioned in the tutorial

  1. The forward direction of your car is the Z axis – make sure all object Z axis are aligned with the word Z axis during setup
  2. Make sure the wheel collider gizmo line is pointing from the center down – the direction of the ground.
  3. When adding the wheels with wheel colliders to the CarController1 wheels array start with; frontRight, frontLeft, rearRight, rearLeft
  4. Fix camera smooth follow issues by parenting an empty to the car and using the empty as the Target for the camera to follow

Another thing to consider is scale and unit setup; 1 Unit in unity is supposed to represent 1 Meter. That makes our car 5 meters long and 3 meters wide; not to realistic.

Also there is the issue of the car rolling over around corners. So far the most practical solution would be to implement stabilizaton as described in the following tutorial.

http://forum.unity3d.com/threads/how-to-make-a-physically-real-stable-car-with-wheelcolliders.50643/

 

Advertisements