heat effect

Hi,
I’m new to game programming and unity.

I would like to know if there is a heat effect that can be applied to an object like a fire and this in turn will cause near by objects to burn and eventually become destroyed.

Thanks :slight_smile:

Detonator lets nearby objects get on fire, maybe a good starting point for you:

http://blogs.unity3d.com/2009/09/17/summer-of-code-detonator-framework-released/

And here:

http://unity3d.com/support/resources/unity-extensions/explosion-framework

no iPhone support :frowning:

How detailed do you want to get with it? It can be done with scripting. You could make it something basic like, when an object touches the flame, it catches on fire, then burns for 15 seconds, then is destroyed.

Or you can get more technical and give the fire a radius of effect with a heat gradient (so, the closer to the flame, the hotter it gets). Then you can have any objects within the flame’s radius of effect gradually build up heat. Give the objects an ignition temperature (paper would be low, wood would be much higher), and when the accumulated heat reaches the ignition temperature, it bursts into flames.

As far as how long it burns, just give it a rate of combustion somewhere on a scale of 0-1, give it a variable for combustible material that starts at 1 and decreases every second it burns at the rate of combustion. When combustibleMaterial hits 0, object is destroyed. Heck, you can even have it transition through textures as it burns to simulate increasing charring.

You can get as detailed or simplistic as you want. It just depends on what is the simplest form that meets your needs in the game.

Also, without understanding the workings of them too well, you’d probably want to use a mesh particle emitter for whatever catches on fire.

Hi Maker16.
I guess it needs to be relatively simple to start with.
The way you described is exactly what I envisaged but due to my newbie status figured I would first check for a prefab.
The radius effect sounds perfect.

I would appreciated any tips on how to go about scripting this myself.

Thanks

How can I get damage of local object, near by explosion ?

You can use rigidbody.AddExplosionForce to throw an object as if it were struck by an explosion, but simulating the damage is more difficult. One way to go is to have several smaller objects joined together and then throw them apart when the explosion occurs.

THANKS !!!
:slight_smile: