How to make a basic vehicle

I and wondering how to make a basic vehicle script. I'm vaguely aware that you would have to use wheel colliders, but I'm not sure how or where. Could somebody provide some resources or just tell me? I'm making an AI tank, and was hoping that I could just rotate the wheels and make them children of the body, and with the right physics setting, do most of the work without script. Is that even possible?

Thanks in advance - Elliot Bonneville

You could do worse than to Google for unity car tutorial.

Yes this is possible. I've found the best way is to create a 'prefab' wheel, consisting of a gameobject with a wheelcollider attached.

Once you've made the prefab, you can then add four instances of that prefab as children of the body of your vehicle. Because they're now prefabs, you can make changes to the prefab (such as changing the suspension) and the change will be automatically reflected in all instances of that wheel.

An important thing to note about wheelcolliders is that you don't rotate them. Instead you use a script to set the motorTorque value, and the spin of the wheel is simulated behind the scenes by the physics engine.

Check the Unity car tutorial at Unity3d.com/support/resources