- Home /
how to make dust after explosion on objects
Q1.How do you make a explosion on impact and maby have somekind of force to make items "blow away"?
Q2. Is there a way to make black dust/smoke after a blast on the surrounding objects depending on distance?
Answer by dylanfries · Jun 29, 2012 at 12:23 PM
Theres a number of parts to this question. Try the Unity Explosion framework for some examples, available in the asset store or HERE . As for the black dust smoke part, you could use a particle system but if you're talking about changing the color of textures dynamically within a range, thats a trickier problem. It should be possible but is pretty complex as it involves overlaying and dynamically combining textures and you would basically have to implement that system yourself. The explosion framework would be a good place to start though.
The package gives 2 errors:
Assets/Standard Assets/Detonator/TestScene/DetonatorTest.js(102,93): BCE0019: 'size' is not a member of 'UnityEngine.Component'.
Assets/Standard Assets/Detonator/TestScene/DetonatorTest.js(105,63): BCE0019: 'detail' is not a member of 'UnityEngine.Component'.
They come from these lines:
line 102: var offsetSize = currentDetonator.GetComponent("Detonator").size / 3;
line 104: var exp : GameObject = Instantiate (currentDetonator, hitPoint, Quaternion.identity);
line 105: exp.GetComponent("Detonator").detail = detailLevel;
hmm, when I made a new project it worked good, but not on my existing project
Don't use strings in GetComponent unless you need the dynamicness of them. Using a string returns a Component object (like the error says).
But does it work on a new project but not on a existing one that I have? It does'nt make sence..
Your answer
![](https://koobas.hobune.stream/wayback/20220613073451im_/https://answers.unity.com/themes/thub/images/avi.jpg)