How do you make destructible objects

How do you make destructible objects. I want to know how I can make destructible walls where once a certain amount of force is applied it breaks into random pieces that are random sizes that of course equal back to what they were on the wall before they were broken.

Two approaches:

Only certain walls can be destroyed, and the level designer carefully places them. The solid wall object is replaced with pre-designed chunks if the player does the right action.

Anything goes. Everything destructible in the level is done with some form of dynamic mesh re-construction, and an algorithm figures out how to turn one mesh object into two mesh objects with the appropriate cutaway polygons added. Some asset libraries on the store support this sort of thing for small objects like NPC bodies or melons being chopped apart, but the same concept would apply to walls. See “Mesh Slicer” for one example. Of course, this approach takes a lot more processing overhead.