Flint Particle System Forum - Make particles collide with BitmapDataZone? Wed, 24 Nov 2010 23:08:35 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Make particles collide with BitmapDataZone? http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=574#Comment_574 http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=574#Comment_574 Wed, 10 Dec 2008 16:03:51 +0000 refresh
Here's my question, sorry if this is obvious, I want to have particles bounce off or collide with a movie clip or image. I'm talking 2d right now.

Using the BitmapDataZone I have been able to do some neat stuff with particles starting off (position) or going to (velocity) an area of a bitmap. But I was wondering if there was an easy way to keep particles within the confines of a BitmapDataZone such that they can move around on the inside of the BitmapDataZone but don't leave it. Does that makes sense? Any one have any ideas how to do it?

The reason for doing this is to keep all the particles colliding within a specific area. I realize I can do this with the BoundingBox action but I was wondering if it were possible to do something similar with an arbitrary shape (in my case I want the particles all contained within a 2d circle).

I'm thinking of adding a BitmapDataZone that triggers an action but I'm not sure if that will work. i.e. can a collision with the BitmapDataZone be the action added and if so how would that be set up.

Any ideas on how to contain particles in a certain area and have them still move around and collide with each other?

Thanks! ]]>
Make particles collide with BitmapDataZone? http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=576#Comment_576 http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=576#Comment_576 Thu, 11 Dec 2008 07:57:17 +0000 Richard
One thing I'd like to add to the next version of Flint is the ability to constrain particles inside or outside of a zone. Some zones will be relatively easy (DiscZone, for example). In the case of a BitmapDataZone, it's easy to determine if the particle is inside or outside the zone (use the zones contains() method), but not at all easy to determine the appropriate action if the particle moves out of the zone - i.e. what is the collision angle when a particle strikes the side of the zone. there are ways to do it by analysing the edges of the BitmapDataZone - similar to techniques for auto-tracing a vector shape around a bitmap image - but I haven't had time to try implementing any such techniques in an efficient way. If you don't care about accurate bounces, you could use the contains() method of the zone to determine if the particle has exited the zone and bounce it back in a sensible but not entirely accurate way. ]]>
Make particles collide with BitmapDataZone? http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=932#Comment_932 http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=932#Comment_932 Fri, 16 Oct 2009 02:33:51 +0100 ericsoco
has the issue of constraints been addressed yet? i too would like to emit moving particles, and constrain them to a region (defined by whatever, but most usefully a DisplayObject). if it's not already implemented, could you please point me in the direction to create a constraint from scratch? the system is very flexible but also very specific about how elements are implemented, and i want to make sure to stick with your architecture.

thanks! ]]>
Make particles collide with BitmapDataZone? http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=939#Comment_939 http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=939#Comment_939 Mon, 19 Oct 2009 22:19:16 +0100 Richard BoundingBox action. This should give you an idea of how to implement more complex constraints within the Flint architecture. ]]>