'How to change Driving settings' (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 ***

The driving settings can be changed from "Drive_Control_CS" script in the "MainBody" in the tank.

This script works in combination with "Drive_Wheel_Parent_CS" and "Drive_Wheel_CS" scripts in the tank to rotate the wheels in the proper direction and at the proper speed.
Also this script controls the motion of the MainBody to stop the tank firmly, and to improve the straight running stability.



*** How to increase the maximum speed ***

Basically we can adjust the maximum speed by changing the "Torque" and the "Maximum Speed" values.

However there is a limit to the rotation speed of the wheels in the current physics engine.

In the case of a tank with "Static_Track" or "Scroll_Track",

The limit speed differs depending on the size of the road wheels.
When the tank has small road wheels such as "Firefly" tank, the limit speed is lower than a tank with large road wheels such as "Cromwell" tank.
The road wheels will start shaking when the rotation speed exceeds the limit (This issue will be solved in the future Unity versions with PhysX 3.4.), so the script has "MaxAngularVelocity Limit" option to clamp the rotation speed in the secure range.
If you want more speed over the range, you need to improve the quality of the physics simulation by decreasing the "Fixed TimeStep" value in the "Game_Controller" in the scene.

(Note.)
Please be aware that the stress on the processor will increase in accordance with the reduction of the "Fixed TimeStep" value.
Also the spring force and the friction force will be increased in the high quality physics simulation.


In the case of a tank with "Physics_Track",

It is hard to increase the maximum speed in the default settings, because the joints in the track pieces cannot keep their connection at the high speed.
If you need more speed, improve the quality of the physics simulation by decreasing the "Fixed TimeStep" value in the "Game_Controller" in the scene.
Try to use the finished tanks in the demo scene "HighQualityPhysics_Scene".



*** How to adjust the acceleration ***

The acceleration of the tank can be adjusted by changing the following values.



*** How to adjust the Parking Brake ***

The parking brake function works automatically when the tank almost stops.
We can adjust the performance of the function by changing the following values.



*** How to use Anti-Slipping function ***

The script has Anti-Slipping function to improve the straight running stability.

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".