- Home /
How can i make my terrain destroyable?
I'm making a game with destroyable terrains.
When you fire a missile and hit the terrain. the place where the missile hit goes boom and you have a crater.
So my question is how can i make my terrain destroyable with C#?
and another question is how can i change the texture in real time based on terrain height like snow on top of the mountain and sand in the ocean?
Answer by AlexJBoyd · Feb 11, 2013 at 04:57 PM
As far as changing textures according to height, I am not to sure. But for the first question, could you just instantiate a crater model to the location the missile hits? Just cover it with some particles so you do not see it just magically appear, and your off to the races.
Answer by XienDev · Feb 11, 2013 at 04:43 PM
=) Imagine a bloom like a sphere< where it's radius is proportional to a bloom power, then, you can subtruct invisible sphere from (contact point + altitude for smoothing) and there would be something like a crater. But, for more believable crater, you should add some riffle (random) and a crater borders.
[1]: /storage/temp/7759-рисунок+без+названия.png
Your answer
![](https://koobas.hobune.stream/wayback/20220613092517im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Renderer Removed When Scene Started 0 Answers
Change texture of RawImage 2 Answers
VideoPlayer not update each frame when moving time or frame manually 0 Answers