- Home /
How do I pull particles towards the player? (Javascript)
Hey guys,
I've searched everywhere, and can't seem to find anything on moving particles through script. At least not in JS. I'm working on a first-person game where the player pulls color from objects, and stores the color in his glove mechanism. I have it set up so that the color explodes from the objects in the form of a particle system, leaving the object gray. What I want to do, is have those particles funnel towards his glove, as if he is actually pulling in the color. Does anyone know how to do this? Here's what I have now:
var holder:GameObject = Instantiate(emitter, transform.position, transform.rotation);
holder.GetComponent(ParticleSystem).startColor = color;
Destroy(holder,2);
//Set color of particle system, depending on the object.
//instantiate particle system "emitter" at object's location.
//Destroy particle system after 2 seconds.
Thanks in advance!
Your answer
Follow this Question
Related Questions
How can I create a particle 'vortex' or implosion using Shuriken? 2 Answers
[VFX GRAPH] Add segments to particle strip 0 Answers
How to make particles move along a path in a particle system? 0 Answers
How can I click the particles emitted from a Particle System 1 Answer
How to prevent particle system from restarting when value changes from script? 1 Answer