- Home /
Cloned Particle Systems emit all at the same time.
Hi All,
I'm instantiating a series of objects which have a child object containing a shuriken particle system. The idea is that when one of the objects is clicked, it begins to emit particles, as a sort of feedback for the player to know that it has been clicked.
This all works fine, but when I click one of the objects, all of the object's particle emitters begin emitting, instead of just the one clicked on.
I know that the click system I've built isn't hitting all of the objects, as that also turns on their ability to be collided with and gathered by the player's avatar, and they are responding to that normally.
Here's the relevant piece of code:
public ParticleEmitter sonarRings;
// Use this for initialization
void Start () {
}
//arrived at via raycasting
public void ShellClick()
{
print ("ShellClick called!");
_isActive = true;
sonarRings.emit = true;
}
//this part works fine.
void OnCollisionEnter(Collision collision)
{
if (_isActive)
{
Destroy(this.gameObject);
}
}
Thanks in advance,
Tom
Your answer
![](https://koobas.hobune.stream/wayback/20220613070659im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Destroy a specific instantiated clone? 2 Answers
Instantiate Reference Problem 1 Answer
Cloned interactivecloth not acting like original interactivecloth. 0 Answers
Cloning Objects with Instantiate() - variables/references for added Components not stored? 3 Answers