"RoadWheels" (Ver.1.1)

This object contains the wheel objects used as road-wheels.
You can modify the road-wheels and the suspensions from this object.

"Suspension" is a suspension arm that can rotate like a torsion bar suspension using physics components.
"RoadWheel" is a wheel attached to the Suspension, and works as a driving wheel controlled by "Wheel_Rotate_CS" script in it.

This object must be placed under the "MainBody" in the Hierarchy.
(Note.) Please take care not to change their hierarchy.

You can modify the road-wheels from "Create_RoadWheels_CS".
The wheels and the suspensions are remade whenever each value is changed.
(Note.) You need to remake the track belts when the wheel has been remade.
Please read also "Track_Belt" and "How to make a Track Belt".

(Suspension settings)
    [Distance]
    Set the distance between opposite suspension arms.

    [Number]
    Set the number of the suspension arms mounted on one side.

    [Spacing]
    Set the spacing of each suspension arm.

    [Length]
    Set the length of between the pivot of the arm and the pivot of the wheel.

    [Angle]
    Set the default angle of the suspension arm.
   

    [Mass]
    Set the mass (weight) of the rigidbody attached to each suspension arm.
   
    [Sus Spring Force]
    Set the spring force of each suspension arm.

    [Sus Damper Force]
    Set the damper force of each suspension arm.

    [Sus Spring Target Angle]
    Set the target angle of the spring from the horizontal position.
   

    [Forward Limit Angle]
    [Backward Limit Angle]
    Set the limit angle of the spring from the horizontal position.
   

    [Mesh of Left]
    [Mesh of Right]
    [Material]
    Set the mesh and Material for the suspension arm.

    [Reinforce Radius]
    Set the radius of the SphereCollider in the suspension arm.
    When the suspensions and the wheels are wobbly in the runtime, try to increase this value.
    (Note.)
    In this project, the suspension arm has a SphereCollider in order to reinforce the fixation with the wheel and the MainBody.
    The suspension arms are placed in 'User Layer 10', and their collision settings are set so that they never collide with any object.

    About the layer collision matrix, please read "Layer Settings".

(Wheels settings)
    [Distance]
    Set the distance between opposite wheels.

    [Mass]
    Set the mass (weight) of Rigidbody attached to each wheel.

    [SphereCollider Radius]
    Set the radius of the SphereCollider attached to the wheel.
    This project uses a SphereCollider as a wheel's collider in order to reduce the stress on the processor.
    (Note.)

    Make the SphereCollider larger than the apparent size of the wheel so that the SphereCollider can touch the ground through the track-belt.


    [Physic Material]
    Set the PhysicMaterial for the wheel.

    [Mesh]
    [Material]
    Set the Mesh and Material for the wheel.

    [Update Value]
    When this button is pressed, the wheels and the suspensions are remade.
    Usually this function is called whenever each value is changed.