- Home /
Spawn Particle Effect on Socket
I'm trying to spawn a particle effect on a socket but the particle effect spawns a bit away from where the socket is, if anyone is able to help me with it, it would be much appreciated, here is the code that spawns the particle effect;
GameObject CreateParticleEffect() { GameObject obj = Instantiate(particleAttack); obj.transform.position = socket.transform.position; obj.transform.parent = socket.transform; return obj; } void MoveParticleEffect(GameObject obj) { obj.transform.parent = null; obj.transform.localRotation = socket.transform.localRotation; obj.GetComponent().enabled = true; }
Thank you in advance for any help that anyone can give me.
Your answer
Follow this Question
Related Questions
Partilcle effect help needed 2 Answers
Particle floating in air 1 Answer
Particle effect spawn help 1 Answer
Particles for dreamy smoke-like effects and bubbles 2 Answers
VFX Graph Texture Sheet Animation 2 Answers