"Track_Belt" (Ver.1.1)

This object is a deformable texture-scrolling track belt controlled by "Track_Scroll_CS" and "Track_Deform_CS" scripts in it.
The track belt is just a mesh without any collider, so the track cannot drive the tank. The tank is driven by road-wheels of the tank differing from an actual tank.

The mesh for track belt can be created by using 3D modeling tools or "Create_Tracks_CS" script in this project.
Please read also "How to make a Track Belt".

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

The scrolling of track belt is controlled by "Track_Scroll_CS".

    [Find RoadWheel [ Left ]]
    [Find RoadWheel [ Right ]]
    When this is pressed, one of the road-wheels on the left or right side is automatically assigned to the "Reference Wheel".
    (Note.)
    When you have modified the road-wheels from the
"RoadWheels", you need to set the "Reference Wheel" again by pressing this button.

    [Reference Wheel]
    Assign one of the road-wheels on the same side. (Use the buttons above.)
    The script changes the UV offset values referring to the rotation speed of this wheel.

    [Scroll Rate]
    Please find the appropriate value that the texture moves synchronizing with the wheels, while driving the tank in the runtime.
    The texture and the normal map are scrolled along U axis.
   


    [Texture Name in Shader]
    Set the property name of the texture in the shader.


The deforming of track belt is controlled by "Track_Deform_CS".

    [Find RoadWheels [Left]]
    [Find RoadWheels [Right]]
    When this is pressed, the road-wheels on the left or right side are automatically assigned to "Anchor Wheels".
    (Note.)
    When you have modified the road-wheels from the
"RoadWheels", you need to set the "Anchor Wheels" again by pressing this button.

    [Number of Anchor Wheels]
    The number of road-wheels used as "Anchor Wheels".

    [Anchor Wheel]
    The mesh deforms according to this wheel.

    [Weight Width]
    [Weight Height]

    The vertices inside of this range (displayed as green square) moves up and down following the "Anchor Wheel".
    When your track deforms wrong, make sure this range is set correctly.
   

    [Offset]
    Set the vertical offset value for the range if you need.

    [Update Value]
    When this button is pressed, the variables in the script is updated.
    Usually this function is called whenever each value is changed.