x


How to emit two partcle systems in one particle emmiter

I have a scrpt(which is the one below) and it works great but I need to know how to make it so it emits to partcle systems on the collision. Or if you know how to make a partcle emmiter emit two different particles at the same time, then that will work too.

var stars : ParticleEmitter;

function OnCollisionEnter (col : Collision) { Instantiate(stars, transform.position, transform.rotation); Destroy(gameObject); }

more ▼

asked Apr 28 '12 at 01:47 PM

jeremy gravatar image

jeremy
31 14 22 23

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

1 answer: sort voted first

The line Instantiate(stars, transform.position, transform.rotation); is spawning the emitter. It finds the emitter through the public stars variable that you made and dragged a prefab particleEmitter into.

Just setup a different emitter (stars2?) and spawn it the same way.

more ▼

answered Apr 28 '12 at 04:31 PM

Owen Reynolds gravatar image

Owen Reynolds
12.2k 1 7 46

(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:

x5268
x3416
x2582
x333

asked: Apr 28 '12 at 01:47 PM

Seen: 476 times

Last Updated: Apr 28 '12 at 04:31 PM