someone asked for this i’m just posting it here so its not buried in an older thread in case anyone else wants to play with it (i just combined my glass content with some from the fps tut so it can be shot).
when shot the glass object checks if its been shot already, if not it cracks. if so, it instantiates a prefab of the glass pieces destroys itself. there’s a mesh with the renderer turned off to instantiate the inital particles. the larger pieces will destruct if the collision is fast enough (this is only done on some as it was too expensive otherwise), all will destruct when shot.
-please note the glass sounds are not mine - i just grabbed them from the internet for testing purposes.
-i’m a noob when it comes to scripting, this all works but i haven’t a clue if this is the best way for this to be rigged. sorry the scripts aren’t commented but they’re small so hopefully its not too bad.
-technically, the smash effect is kinda wrong as its mixing the break patterns of annealed glass (shards) tempered glass (bits). all shards was too many objects a PITA to set up, all bits needed way to many particles to look convincing so i compromised ; )
i have alot to learn, and the content i’ve shown ( more i will show before too long) i chose to do first so i could figure out how to do specific things. so yes they are to understand unity (and normal maps, and low poly modeling, and scripting, and physics yadda yadda), they may make it into the commercial product that’s planned and they may not - i haven’t a clue atm ; )
i new to pretty much all aspects of game production right now i want to do as many varied things as i can to (hopefully) have some sense of scope - i.e. what’s possible, what’s practical, required production times etc.
regarding the package, sure i will add to it in the future if you or anyone is interested. there’s ALOT more i have planned for object destruction too, but this is not on my current todo list and won’t be for a while. but let me know if you come up with anything as well maybe we can continue with it later ; )