'How to finish "Static_Track"' (Ver.3.0)

Please feel free to contact me if you have any questions.
shopmaster@chobi-glass.com
http://chobi-glass.com/Unity/index.html



*** Outline ***

This section shows how to put the final touch on the "Static_Track" made in the previous steps.
We can make the "Static_Track" more realistic in the following steps.



*** Adjust the driving settings ***

The tank with "Static_Track" is able to drive much faster than a tank with "Physics_Track".
Select the "MainBody", and try to increase the "Maximum Speed" value as you will in the "Drive_Control_CS (Script)".


Also this script has Anti-Slipping function to improve the straight running stability of the tank.
This function detects the ground by casting a ray downward from the pivot of the MainBody.
Therefore we need to set the approximate distance from the pivot of the MainBody to the ground into the "Ray Distance" in the script.
In this tutorial, set as follows.




*** Add invisible RoadWheels ***

The track piece in "Static_Track" has no collider, and only moves up and down according to the specified RoadWheel.
Therefore some pieces often go through the ground when the spacing of the roadwheels is wide, such as T-34 below.
To make up for this shortcoming, we can add invisible RoadWheels to the tank.
(In this tutorial, we will skip this step, because the gap of wheels in our new tank is not very serious)

  1. Duplicate the "Create_RoadWheel" in the tank, and adjust the position so that the new wheels fill the gaps between the original wheels.
    In some cases, you need to also adjust the "Number" and "Spacing" values.


  2. Clear the "Mesh" values to make the wheels invisible.


  3. Reset the type of each track piece referring to the next step.



*** Reset the type of each track piece ***

"Static_Track" has three types of track pieces.

The types of all the pieces are set automatically when they are created, and also they can be reset manually if we need.
We can change the type by selecting each piece directly.
(Note.)
The type of the opposite piece is changed automatically, so you need not change the both pieces in left and right.



Also we can reset all the types automatically by pressing some buttons in the "Static_Track" object (not the pieces, but the parent object).


When you press the buttons, the result will be displayed in the Console window.
If you cannot get a satisfying result, adjust each "Effective Range" value, and press the button again.


In the case of T-34 in the previous step, the several pieces will be changed into "Anchor" type by detecting the new invisible RoadWheels, by pressing the "Set Types with RoadWheels" button with the following settings.

Also we need to change the upper pieces above the invisible RoadWheels from "Anchor" into "Dynamic" so that they never follow the wheels.


In this tutorial, our new "Static_Track" alredy has acceptable settings, but if you are not satisfied, please try the resetting.



Progress to the next section.

"Static_Track" is also able to sway according to the tank motion in combination with "SwingBalls".
In the demo scenes, the tracks of the player's tank are swaying physically by using the SwingBalls.

Try to make our tracks more realistic in the next section.

Please progress to the next section 'How to attach "SwingBalls"'.