'How to convert "Physics_Track" into "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



*** Bug Patch ***



*** Outline ***

This section shows how to convert the "Physics_Track" made in the previous steps into "Static_Track".

(Note.)
This project has three track systems "Physics_Track", "Static_Track" and "Scroll_Track".

"Static_Track" is created by converting from "Physics_Track" that is transformed physically in the runtime.
Therefore we need to get a "Physics_Track" that has the ideal figure in the runtime before creating a "Static_Track".




*** How to convert "Physics Track" into "Static Track" ***

(0) Back up the tank.

The settings of the tank will be largely changed in the following steps.
Therefore please back up your tank by creating a new prefab.
About how to create a tank prefab, please read 'How to save a new Tank Prefab'.


(1) Select the "Create_TrackBelt".

The converting function can be called from the "Create_TrackBelt" in the tank.
Select it in the Hierarchy window, and find the "Create_TrackBelt_CS (Script)" in the Inspector window.


(2) Enable the "for Static Track" option.

Enable the "for Static Track" option.



(3) Enter the play mode.

The converting process is executed in the runtime.
Press the Play button to enter the play mode.


(4) Press the "Create Prefab in 'User' folder" button.

Make sure that the tracks are transformed physically, and have the ideal figure.
Then, press the "Create Prefab in 'User' folder" button in the Inspector window.

(Note.)
The camera operation will be canceled after a few seconds, because the physics engine is paused to keep the track shape.
When it is difficult to look at the tracks in the Game View, please switch to the Scene View.



(5) Find the new "Static_Track" in the "User" folder.

You can find the new "Static_Track" named as "Static_Track ##_##" in the "User" folder.



(6) Attach the new "Static_Track" into the tank.

Drag and drop the new "Static_Track" into the "MainBody" of the tank in the Hierarchy window, and make sure it is placed under the "MainBody" as a child.



(7) Remove the "Create_TrackBelt" from the tank.

The "Physics_Track" is no longer required.
Remove or inactivate the "Create_TrackBelt" in the tank.


(8) Set up the new Static_Track.

"Static_Track" requires reference to the RoadWheels to move the track pieces according to the tank speed.
Also all the wheels in the tank must be updated to work in combination with the "Static_Track".
Please set up the "Static_Track" in the following steps.
  1. Select the new "Static_Track", and press the "Set Automaticcaly" button.


    Make sure that the "Left Reference Wheel" and "Right Reference Wheel" values are set automatically.



  2. Select the "MainBody", and press the "Update Values" button.


    The "Mass" and the "Solver Iteration Count" values have been updated automatically.
    The weight of the body should be increased as the weight of all the track pieces, because the piece of "Static_Track" is not a physics object.
    Also the "Solver Iteration Count" value can be reduced to 10, becaue "Static_Track" does not require the high accuracy in the physics simulation.


  3. Check the "Drive_Control_CS (Script)" has been updated.
    The "Torque" and "Turn Brake Drag" values have been increased automatically.
    The ground contact area of the tank has been much reduced, because the new tracks no longer have any collider, and the tank touches the ground only with Sphere Colliders in the wheels.
    Therefore the tank with "Static_Track" requires larger torque and brake drag than a tank with "Physics_Track" to drive and turn smoothly.


  4. Update all the wheels in the tank.
    Press the "Update Values" button in the "Create_IdlerWheel", "Create_SprocketWheel" and "Create_SupportWheel".

    (Note.)
    If the tank has multiple "Create_SupportWheel" objects, press the button in each object.



    Also press the "Update using stored values" button in the "Create_RoadWheel".

    (Note.)
    If the tank has multiple "Create_RoadWheel" objects, press the button in each object.


    Make sure that the RoadWheels have been updated to fit for the Static_Track.



(9) Test the new "Static_Track" in the runtime.

Test the new "Static_Track" while driving and turning the tank on the field.
Check the following points.


Progress to the next section.

We have got the new "Static_Track".

In the next section, we will put the final touch on the "Static_Track".

Please progress to the next section 'How to finish "Static_Track"'.