- Home /
bind instantiated particles to an object
hi there, its me again is there a way to bind instantiated particles to an object. Iam working in a role playing game and when my player is hit by a wapon he gives a splash of blood. when he is standing, it looks ok, but when he moves the instantiated particles stay at their birthplace. it will look much cooler , if the player object inherit his velocity to the particles. is there a way to do this???
lots of thx ThisIsTom
Answer by Design3.com · Jan 14, 2010 at 12:54 AM
I would make a particle system GameObject a child of the character splashing the blood and uncheck the "Emit" button in the Particle Emitter component. Now instead of Instantiating the particles you need to do something like:
particleEmitter.emit = true;
yield WaitForSeconds(0.5);
particleEmitter.emit = false;
Now the particles will emit with the blood-splasher as it moves, though they'll still stay in their birthplace. You can make the particles move with the particle system GameObject (and inherit its position) by checking "Simulate in Worldspace" in the particle emitter component, which I think is what you're asking about.
Your answer
Follow this Question
Related Questions
Instantiated Particles reverse direction. Why? 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Timetrail script creating 2 trails and not destroying the second 0 Answers
How do I make instantiated particles inherit Transform movement from their parent object? 1 Answer
Share material on Instantiate() 1 Answer