Hello Unity3D i have a question about buildings.How can i make it that when my character hits a building with enough force they can destroy a building and the building gets destroyed in a smooth manner without having to use blender to animated it.If it is possible to do such a thing in unity3D.Can someone please tell how this could be done?
You can achieve this through long amounts of learning the fundamentals of programming. Iâm not going to provide you with a âplug n playâ solution. What you may what to do is look into mesh deformation, or you may want to model separate pieces for the building in the 3D modelling program of choice.
As for if Unity can do it, it doesnât provide a drag and drop if thatâs what you are asking. The only limitations are what you are willing to learn and apply within Unity.
EDIT :
Another thing you could do, (Which I am assuming is what they are doing in the video) is create each piece as a rigidbody that is set to not fall. Then when collided with, check the velocity of the interacting object and if it is above a certain threshold, turn the gravity on. (However this is possibly the least efficient way in large numbers)
âIâm not going to provide you with a âplug and playâ solutionâ, replies like this make programmers seem self centered and caustic, remember you had to learn once upon a time.
OK you need two models, one solid one pre-broken*. When your character/game applies enough force the breakable model is swapped in and the physics engine takes over.
This reduced graphics and physics load when your game is not breaking buildings.
You can also in Unity run a physics simulation of part of a building breaking, record it as an animation and play it back when your game breaks a building. Not as dynamic but could be useful to reduce processing load if your character/game can break distant buildings e.g. LODâing the damage/destruction.
Ironically the people who often make the statement you made are the ones who seem to provide the least assistance. A quick check through your posts shows very little since you have almost no presence here, but a check through @Myhijim 's posts, especially the ones in the Scripting section, show that he has provided extensive assistance.
Youâre free to provide a solution of your own if you wish or better yet provide some helpful assistance towards learning how to implement a system of this nature. After all getting handed code for free doesnât teach you anything, but getting help and having questions answered does. From the way the OPâs post reads he was asking for advice not a handout.
If you really want to do your best, and learn the most, donât waste any time fussing over somebodyâs method of communication. So what, you got your feelings hurt? Nobody cares, and so long as you do, you arenât doing yourself any good at all.
If there was something useful said, use it. If not, carry on.
There are two common approaches: (a) fracture the mesh within a modeller, and (b) fracture the mesh in Unity. Learning resources for the first method are very common but resources for the second exist almost entirely as code you need to read and learn from as the technique isnât trivial.
Here is one of the more recent (April 2017) tutorials for the first method.
Please explain the helpful advice? This type of crap attitude is why developers get a bad name, itâs not our fault your parents didnât give you the skateboard you wanted when you were 10 years old, so leave their basement already. And yes I do hire people, and if they fail to demonstrate empathy for newbies, they will not be working for me.
You are trying to reason with a person who has never asked for help, who is all knowing and a virtual walking Google, just ask him. This board will quickly sink into Stack overlflow before you know it.
Truthfully the post was aimed at you. You speak of people being self-centered, being caustic, make the claim that Unityâs forums are progressing towards the mentality found at Stack Overflow, etc but youâve been with us now for four years and you have yet to provide any assistance yourself whereas everyone else in this thread has done so many many times.
What sinks forums is personal attacks (not allowed), and demanding that other people do your work for you. Weâve quite literally had members called âlazyâ for not spending their time writing free code on the forums, in a frankly breathtaking display of entitlement. That sort of toxic attitude isnât welcome here, and that goes for necroing threads only to berate people while adding nothing.