Hello,
I’m wondering what is the best way to create an effect of a destructable object with Unity. I mean like a wall you could shoot at and it would crumble down.
I just checked out an amazing video clip in Nvidia’s PhysX site: http://developer.nvidia.com/object/apex_destruction.html (bottom of page) and that’s really the sort of effect I’m looking for.
I understood though, that this APEX thingy is not really public technology quite yet, but how would I best mimic this in Unity?
I’ve seen some posts about replacing meshes from intact to a destroyed one, but are there better ways to do this?
I though some more babbling about this was in order and so here’s a use case:
Consider a game where you would shoot a cannon at a castle.
To achieve the crumbling walls effect, would it be feasible to make up the castle out of several meshes (like front wall, towers, etc) and then make a fractured copy of these meshes, where each piece would be it’s own rigid body with a collider.
Then, when the player shoots his cannon, the affected mesh(es) would be identified and switched to the fractured ones, just before the cannon ball hits them.
Wouldn’t this effectively lead to crumbling as the cannon ball hits the wall? I though this would be a more elegant and feasible than just having the entire castle consist of thousand of pieces, but I’m a beginner so correct me, if I’m not on the right track with this 
It’s not exactly what you’re looking for, but… well, maybe you can use it for something?
http://www.unifycommunity.com/wiki/index.php?title=Unity_Explosivo!#Bomb_the_Barn
Sounds like this. http://mirvadim.com/ which is the rayfire tool for Max.
It also uses the Physx engine which Unity has.
The “ice” or “glass” feature automatically hides the solid mesh when hit, and switches to the subdivided one, where physx takes over, and it all comes crumbling down.
In unity I’m not sure how to script a hide/unhide when hit, but i’m sure its possible… and you could have your mesh crumble. Perhaps? (computationally expensive i bet though,… maybe for a cut scene or locked off shot)
just disable the renderer component.
Through scripting you mean? (fire shot, or collision trigger, hits object, and switch off render component?) btw, would this actually “unload” objects from the scene, such as streaming? If so, would be sweet.
Sorry to hijack thread, just asking.
thx
Yes in scripting.
It would just hide it, nothing else.
For removal you would have to destroy it.
There is no such thing as streaming actually when it comes to loading unless you have your own loading code.
Got it,… thanks Dreamora.
Thanks guys!
That plug-in looks fantastic. I can’t use it though, I’m working in XSI, but I guess I can try the mesh switch anyways!
I wonder if XSI’s ICE could achieve something similar. Possibly, but I’m a total beginner with ICE 