'How to change Sound 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 **

We can attach three kinds of sound effects to the tank.



*** How to change the Engine sound settings ***

Select the "Engine_Sound" object in the tank, and find the "Sound_Control_Engine_CS (Script)" in the Inspector window.


The volume and the pitch of the sound is controlled referring to the velocity of the specified road wheels, so we need to set the references to the "Left (Right) Reference Wheel".
You can set them automatically by pressing the "Set Automatically" button.

The "Max Speed" value is also set automatically by pressing the button.
However if the tank has "Physics_Track", we need to find and set the real maximum speed of the tank in the runtime.
We can check the current speed of the tank in the Inspector window in the runtime.


About the other options, please read below.

Also you can change the sound file in the "Audio Source" component.
About the "Audio Source", please read the Unity manual.
https://docs.unity3d.com/2018.1/Documentation/Manual/class-AudioSource.html



*** How to change the Turret Motor sound settings ***

Select the "Turret_Base" object in the tank, and find the "Sound_Control_Motor_CS (Script)" in the Inspector window.


The volume of the sound is controlled referring to the rotation speed of the turret.
You can adjust the maximum volume of the sound.

If you need additional motor sound for the cannon rotation, add "Sound_Control_Motor_CS" script and "Audio Source" component into the "Cannon_Base" in the tank.

Also you can change the sound file in the "Audio Source" component.
About the "Audio Source", please read the Unity manual.
https://docs.unity3d.com/2018.1/Documentation/Manual/class-AudioSource.html



*** How to change the Impact sound settings ***

Select the "MainBody" in the tank, and find the "Sound_Control_Impact_CS (Script)" in the Inspector window.


The volume and the pitch of the impact sound while driving are controlled referring to the vertical velocity of the MainBody.
The sound is produced only when the variation of the virtical velocity per frame is larger than "Min Impact" value.

Also you can change the sound file in the "Audio Source" component.
About the "Audio Source", please read the Unity manual.
https://docs.unity3d.com/2018.1/Documentation/Manual/class-AudioSource.html