Controller
Last updated
Last updated
Assets/FORGE3D/DamageFX/Scripts/DamageFX.cs
In order to control the Damage FX Shader, an instance of the script should be present on each Damage FX Object. The script component handles the data processing for impact spots and fades the heat values over time.
Use DamageFX.Hit() method of the script to add new impacts to the surface of the mesh as shown below:
Here is the simple code snippet that will add the damage point to the Damage FX Object under the mouse cursor on left mouse click: