Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: piere on June 17, 2011, 09:22:33 PM
-
Is it possible to make a particle emitter move or follow an actor? I was thinking about doing the SkipTo command while looping but I can't figure out how to make it go towards the actor. Thanks
-
See the documentation for CreateParticleEmitter. It has an optional 'FollowOwner' parameter (plus an optional offset).
var emitter = actor.CreateParticleEmitter(true);
or
var emitter = actor.CreateParticleEmitter(true, offsetX, offsetY);
-
Thanks, but I think I said it wrong. I want a particle to start to follow an actor from across the room. So it will be like the particle will float or walk to the actor, not just be on the actor right away.
-
I'd create an entity and wrote a simple tracking script which would get the vector from its position to current actor's position and move along that vector for each tick (this will make the entity follow the actor). Then I'd attach particle emmiter to that entity.