Fork me on GitHub
Not signed in (Sign In)

Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

    • CommentAuthorbirdsigh
    • CommentTimeJul 20th 2010 edited
     
    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 moved around once the emitter is started.



    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!
    • CommentAuthorRichard
    • CommentTimeJul 24th 2010
     
    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 its current location. Can you post some example code that I can debug?