How to demolish Mesh object by shooting

1.	Create a Cube, this will be the cube which will shoot and demolish. 

2.	Set its name to "Wall", position to [0,2,0] and scale to [1, 3, 4]

3.	Remove it's Box Collider because the Rigid component will add its own collider.

4.	Create another Cube, this will be a ground cube which will be used for collision.

5.	Set its name to "Ground", position to [0,0,0] and scale to [10,1,10]

6.	Add RayFire Rigid component to Wall.

7.	Set Rigid Initialization to At Start and Demolition type to Runtime.

8.	In Damage properties turn On Enable checkbox. Now every shot will apply damage defined in Gun component, when Current Damage value will reach Max Damage value object will be demolished.

9.	Create Cylinder, this will be our gun.

10.	Set its name to "Gun", position to [5,2,0], rotation to [0, 0, 90] and scale to [0.2,0.4,0.2]

11.	Add RayFire Gun component to Gun object and set Axis property to Y Green, disable Show Impact property.

12.	Set Impact Strength property to 3, Damage value to 60 and enable Flash checkbox.

13.	Start Play Mode. 

14.	Select Gun object and click on Single Shot button. The same can be initiated in your code by public method Shoot()

Wall object will get physical impact and a small flash will appear for a moment at the impact point.

15.	Select Wall object, in Damage properties you will see that Current Damage value now is 60. This damage was applied by first shot.

16.	Select Gun object and click on Single Shot button again.

This time Wall object will be demolished because Current Damage value will be 120 which is more than Max Damage 100.