Flint Particle System Forum - Make particles collide with BitmapDataZone?2010-12-25T17:11:59+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Make particles collide with BitmapDataZone?http://flintparticles.org/forum/comments.php?DiscussionID=142&Focus=574#Comment_5742008-12-10T16:03:51+00:002010-12-25T17:11:59+00:00refreshhttp://flintparticles.org/forum/account.php?u=119
Hi, first of all thanks, Richard, for the brilliant particle system. I'm really enjoying using it and it seems very well designed and fast. Awesome!
Here's my question, sorry if this is obvious, I ...
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_5762008-12-11T07:57:17+00:002010-12-25T17:11:59+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi
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 ...
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_9322009-10-16T02:33:51+01:002010-12-25T17:11:59+00:00ericsocohttp://flintparticles.org/forum/account.php?u=256
hi all. richard -- great library you've put together. very full-featured and object oriented, delicious.
has the issue of constraints been addressed yet? i too would like to emit moving ...
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_9392009-10-19T22:19:16+01:002010-12-25T17:11:59+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
There is a simple rectangular constraint already implemented - the BoundingBox action. This should give you an idea of how to implement more complex constraints within the Flint architecture.
BoundingBox action. This should give you an idea of how to implement more complex constraints within the Flint architecture.]]>