x


One particle pulse when gameobject is destroyed.

Hello

I have been messing around with this for some hours now, and i just cant seem to figure it out.

what i want to do is to have a single pulse of a particle system when i destroy a box.

I saw a video tutorial once which explained it but i cant find it anymore, and now im here :)

I've set up the particle system so its set to 'one shot' but how do i script it so the pulse is fired when i click the object and it is destroyed.

im using C# for this.

Thanks in advance

  • Seth
more ▼

asked Mar 10 '11 at 12:17 PM

Kacer gravatar image

Kacer
783 16 19 32

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Put the particle system in a prefab and use Instantiate to make a copy when you destroy the object you click.

more ▼

answered Mar 10 '11 at 05:43 PM

flaviusxvii gravatar image

flaviusxvii
4.6k 16 21 48

(comments are locked)
10|3000 characters needed characters left

check out ParticleEmitter.Emit()

we are lucky to have good documentation with unity http://unity3d.com/support/documentation/ScriptReference/ParticleEmitter.Emit.html

more ▼

answered Mar 10 '11 at 02:28 PM

loopyllama gravatar image

loopyllama
1.5k 1 4 18

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3071
x1080
x929
x36
x10

asked: Mar 10 '11 at 12:17 PM

Seen: 1911 times

Last Updated: Mar 10 '11 at 12:17 PM