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
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;
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.
thanks, sounds good, will try it right now
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
The name 'Joystick' does not denote a valid type ('not found')
Instantiated Particles reverse direction. Why?
Timetrail script creating 2 trails and not destroying the second
Spawning problems with cameras
Camera follow script not following player?