Simple Fracture ( Destruction )

Hello Guys,

I founded that script on the net : Simple Fracture and it suppose to create Destructible Environment. I apply it on a Cube that I flatten out and tag as “Target”. And I put these lines of code in my Shoot Script :

if ( Hit.rigidbody.gameObject.CompareTag("Target")) {
    	SimpleFracture.FractureAtPoint( point : Vector3, force : Vector3);
    }

The problem is that I get these errors.

For those of you who know how to use it maybe help with this question : Does the fracture script go on the object I want fracturing, and the call fracture in the same script?

Best Regards,
NbO

Source

the function “FractureAtPoint” is to recieve a (point : Vector3) and (force : Vector3) when you call it.

Send it the information you want to send, not weird parameters or whatever---- point : Vector3 being the hit area, and force : Vector3 being the force you want to add.

Example :

var forceToFracture : Vector3 ; //set in inspector
 
         if(Hit.rigidbody.gameObject.CompareTag("Target")){
            SimpleFracture.FractureAtPoint(Hit.point , forceToFracture) ;
         }

I’m assuming you’re raycast-shooting… idk… anyway Hit.point would be whatever contact-point vector3 you’re hitting stuff at.