particle emitter relative to movement?
Adrenaline
Member Posts: 523
I've been struggling with this for a little while.
I'm spawning particles to make a trail behind a circular actor. The actor is 20x20. With the goal of making it look like the particles are spawning behind the actor, I'd like to use the offset so they spawn at the visible edge of the actor.
The actor is always moving, interacting with other objects and bouncing around the scene. How can I set the emitter offsets (x and y) so it dynamically adjusts to the motion of the actor?
Thanks!
Comments
Use global attributes that are constrained to the actor's x and y, then use those global attributes in the particle spawner?
Or is the spawner in the actor itself?
Emitter Offset:
X = -10
*
cos( self.Rotation )Y = -10
*
sin( self.Rotation )Demo attached:
Thanks for the demo @Socks but I tried that already. I see how it works in your demo but for my particular case, that isn't the solution.
Here's a stripped down version of my project here, maybe you could take a quick look?
https://drive.google.com/file/d/0B0HfU3-sgNs5UkQtbVdlZDFNVDA/view?usp=sharing
Thanks!
Maybe try . . . .
-10
*
cos(vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y ))-10
*
sin(vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y ))?
You're a beautiful person
Thank you.
Also thank you for that suggestion! The reason it didn't apply here was because I have, potentially, a lot of actors spawning these particles...so using attributes to store the location could get heavy and cumbersome.