Question by
Cailean64 · Jan 30, 2017 at 04:43 PM ·
c#instantiateparticlesystem
Instantiate particle system attached to object
I have a particle system that I instantiate with the following code:
Instantiate (gunParticles, transform.position, transform.rotation);
however when i do this and move my player the particle system stays where it is.
How to attach the particle system to my player when its created?
Comment
Answer by ifurkend · Jan 31, 2017 at 02:08 AM
After instantiation, attach your particle effect object on your target with Transform.parent like:
(particle effect object).transform.parent = (parent object).transform;
Your answer
Follow this Question
Related Questions
How to Instantiate decals where particles from particle system hits? 1 Answer
How to instantiate a game object every time when space key is pressed 2 Answers
Instantiate an object until edges of floor 2 Answers
Can You help me Fix This? (Infinite level Generator) 0 Answers
Object reference not set message, directly after instantiation 1 Answer