x


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

more ▼

asked Jan 13 '10 at 10:59 PM

Tom de Jank gravatar image

Tom de Jank
333 7 8 12

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

1 answer: sort voted first

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.

more ▼

answered Jan 14 '10 at 12:54 AM

Design3.com gravatar image

Design3.com
655 1 1 11

thanks, sounds good, will try it right now

Jan 14 '10 at 08:49 AM Tom de Jank
(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:

x7789
x2487
x928
x196

asked: Jan 13 '10 at 10:59 PM

Seen: 2859 times

Last Updated: Jan 13 '10 at 10:59 PM