Flint Particle System Forum - Is there a way to hitTestObject Particles?2011-12-11T11:28:15+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Is there a way to hitTestObject Particles?http://flintparticles.org/forum/comments.php?DiscussionID=64&Focus=313#Comment_3132008-08-10T15:47:31+01:002011-12-11T11:28:15+00:00maccohttp://flintparticles.org/forum/account.php?u=51
Is there a way to hitTestObject Particles?
Is there a way to hitTestObject Particles?http://flintparticles.org/forum/comments.php?DiscussionID=64&Focus=314#Comment_3142008-08-10T17:56:04+01:002011-12-11T11:28:15+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi Macco
If you use a DisplayObjectRenderer then each particle is represented by a unique display object and you can do a hitTestObject on it. The display object is the particle's image property ...
If you use a DisplayObjectRenderer then each particle is represented by a unique display object and you can do a hitTestObject on it. The display object is the particle's image property so do
displayObj.hitTestObject( particle.image );
If you use a PixelRenderer then each particle is represented by a single pixel and you can do a hitTestPoint on the particle's x and y position
If you use a BitmapRenderer then you can't do a hitTestObject on the particle. In theory you could create your own hitTest method based on the particle's x and y coordinates, scale, image.width, image.height, etc.]]>
Is there a way to hitTestObject Particles?http://flintparticles.org/forum/comments.php?DiscussionID=64&Focus=1250#Comment_12502010-07-16T19:08:11+01:002011-12-11T11:28:15+00:00Ubuntuhttp://flintparticles.org/forum/account.php?u=387
I am very confused with the particle hitTestObject and hitTestPoint because I cant find any examples and cant get mine to work. I am using your GravityWells class except the emitter is called ...
if(Testbox.hitTestPoint(gravityemitter.particles.x, gravityemitter.particles.y)) { trace('hit'); }
What am I doing wrong? btw for the displayobjectrenderer and pixelrenderer is there anything that must be imported for the hitTests to work? And are there any online examples? Other than this, I love your Particle Engine Richard, and I am planning on creating some games with them. -Thank You]]>
Is there a way to hitTestObject Particles?http://flintparticles.org/forum/comments.php?DiscussionID=64&Focus=1258#Comment_12582010-07-24T17:41:44+01:002011-12-11T11:28:15+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi
The particles property is an array. If you want to hittest an individual particle, you need to use one item from the array, not the whole array. ...
The particles property is an array. If you want to hittest an individual particle, you need to use one item from the array, not the whole array. i.e.
if(Testbox.hitTestPoint(gravityemitter.particles[0].x, gravityemitter.particles[0].y)) { trace('hit'); }]]>
Is there a way to hitTestObject Particles?http://flintparticles.org/forum/comments.php?DiscussionID=64&Focus=1276#Comment_12762010-07-28T09:42:26+01:002011-12-11T11:28:15+00:00Ubuntuhttp://flintparticles.org/forum/account.php?u=387
Thank u it works fine now.