Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have created a gameObject called "Sphere". After 5 secs the gameobject starts rotating. Along with the rotation I need to emit partical from the object. How can I do this?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You need to add your particle system to your gameObject. then you can activate it by something like this:

    // this is in the initial declaration
    particleEmitter pe;

    // this is in the Start() function
    pe = gameObject.GetComponent<ParticleSystem>().particleEmitter;

    // this go's inside your counter function and needs to get called 
    // when you activate to rotation
    pe.emit = true;

you need to turn of the emission component of the particle system in the editor

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.