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

    • CommentAuthorNateJC
    • CommentTimeJun 16th 2010
     
    I've got a reference to a Particle (using emitter.particles[n]). How do I access the global x, global y, and current velocity of this particle?

    I've tried accessing emitter.particles[n].image.x, but this always returns 0.
    • CommentAuthorNateJC
    • CommentTimeJun 16th 2010
     
    Never mind. I realized that all of that information is stored in Particle2D or Particle3D so I just had to cast the returned particle reference:

    var p:Particle2D = Particle2D(emitter.particles[n]);
    p.x
    p.y
    p.velX
    p.velY

    Thanks!
    • CommentAuthormfrdorov
    • CommentTimeSep 19th 2011
     
    Thanx man! i search for this.