Super simple rigid body destruction, how?

You know in GTA or the older midtown madness games you can drive into a lamp post or other objects and they would fall over? If I just use a normal rigid body it will fall over without being hit so how would I only activate a rigid body after it has been hit with, say, a collider from any other object?

This might not be the best method but should work.
I just tested it and it does. I was thinkin this same thing about 3 weeks ago while messing around with GTA 5 for first time.

For test - Make two cubes. In blank scene. The first one is your mover (car or person or whatever). The first one should have a kinimatic (for test purposes at least) rigidbody and a collider.

The second cube just has a box collider set to trigger. You shouldnt even need a actual collider on it (other than the trigger, i dont think this affects performance now with 5.x but that’s a hunch after lots of messing with it).

Then you do -
void OnTriggerEnter(Collider other){
if (other.gameObject.name.Contains(“Cube”)){
other.gameObject.AddComponent ();
}

You have to add rigidbody with greater than less than signs around it right after addcomponent… it’s not showing up in the comment sorry.
In a small script on the kinimatic cube.

Hit play, drag your cube with kinimatic rigid body on it into the other cube and it will fall as you are wanting.

I don’t know about any static checkbox effects with this that could be bad but if you have it marked static your mesh will stay where it is and your collider will fall (which will make it look like it didnt work unless you have it selected. Just wanted to mention that because it looks damn confusing at first but makes sense.

After your objects done bouncing around you should have something in a script on it to destroy both the rigidbody (if you don’t want it to move anymore) and the script that’s going to remove that rigid body itself). You could also just keep track of those objects in a list on your kinematic moving body and just deactivate those later though (might save some script room, depends on your situation).

j