Flint Particle System Forum - Setting Particles in a Layout on Initialisation2011-12-11T09:31:14+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Setting Particles in a Layout on Initialisationhttp://flintparticles.org/forum/comments.php?DiscussionID=373&Focus=1253#Comment_12532010-07-20T20:06:06+01:002010-07-20T20:08:36+01:00birdsighhttp://flintparticles.org/forum/account.php?u=366
I have an Array of Sprites that are arranged as I want on stage. I want to be able to take these Sprites and have them turned into Particles, whilst staying in the correct layout, and then being ...
I can take the Array of Sprites and add these to the emitter as particles (using createParticle2DFromDisplayObject and addExistingParticles), and they are moving around as I want when the emitter is started. However, I cannot set the initial position for each particle to match the layout of the Sprites (as shown above).
Trying to set the x, y value on the Particle2D simply moves all particles to be initialised at the x,y coords of the last particle in the Array I passed to addExistingParticles. Setting an initialiser position only lets me spawn all particles from one coordinate (as show below).
Hopefully I'm just vastly overcomplicating this and it isn't as hard as I'm making it for myself :) Can anyone help me on how to do this?
Thanks!]]>
Setting Particles in a Layout on Initialisationhttp://flintparticles.org/forum/comments.php?DiscussionID=373&Focus=1261#Comment_12612010-07-24T18:08:13+01:002011-12-11T09:31:14+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi
This sounds a bit odd. If you indicate the renderer when calling createParticle2DFromDisplayObject, then the x and y should be set automatically for you so that the display object starts from ...
This sounds a bit odd. If you indicate the renderer when calling createParticle2DFromDisplayObject, then the x and y should be set automatically for you so that the display object starts from its current location. Can you post some example code that I can debug?]]>