Flint Particle System Forum - Accessing global x, global y, and velocity info for a Particle 2011-10-16T20:53:38+01:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Accessing global x, global y, and velocity info for a Particle http://flintparticles.org/forum/comments.php?DiscussionID=365&Focus=1229#Comment_1229 2010-06-16T19:24:28+01:00 2011-10-16T20:53:38+01:00 NateJC http://flintparticles.org/forum/account.php?u=376 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, ...
I've tried accessing emitter.particles[n].image.x, but this always returns 0.]]>
Accessing global x, global y, and velocity info for a Particle http://flintparticles.org/forum/comments.php?DiscussionID=365&Focus=1230#Comment_1230 2010-06-16T19:32:34+01:00 2011-10-16T20:53:38+01:00 NateJC http://flintparticles.org/forum/account.php?u=376 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 = ...
var p:Particle2D = Particle2D(emitter.particles[n]);
p.x
p.y
p.velX
p.velY

Thanks!]]>
Accessing global x, global y, and velocity info for a Particle http://flintparticles.org/forum/comments.php?DiscussionID=365&Focus=1722#Comment_1722 2011-09-19T16:23:16+01:00 2011-10-16T20:53:38+01:00 mfrdorov http://flintparticles.org/forum/account.php?u=544 Thanx man! i search for this.