Flint Particle System Forum - Make particles decellerate and stop in a circular area 2010-11-17T11:47:36+00:00 http://flintparticles.org/forum/ Lussumo Vanilla & Feed Publisher Make particles decellerate and stop in a circular area http://flintparticles.org/forum/comments.php?DiscussionID=131&Focus=517#Comment_517 2008-11-18T09:48:07+00:00 2010-11-17T11:47:36+00:00 ifthenelse http://flintparticles.org/forum/account.php?u=105 Hello, first of all thank you for this useful libs! It's an awesome job and easy to learn also for a newbie like me. Unfortunately I've got a problem while making an intro for a website: it consists ... Unfortunately I've got a problem while making an intro for a website: it consists in some particels which start out of the stage which should converge into a cirlce area at the center of the stage.
I used a GravityWell at the center of the stage to impress the acceleration to particles, but when they reach a circle position, they start to overlap each other. Instead of this I want they to pogressively decellerate and then stop within a circular area around the center fo the stage. I don't know if I should consider another choice. Please, can anybody help me?

Heres the code:

import flash.geom.Point;
import org.flintparticles.common.counters.*;
import org.flintparticles.common.displayObjects.Dot;
import org.flintparticles.common.initializers.*;
import org.flintparticles.twoD.actions.*;
import org.flintparticles.twoD.emitters.Emitter2D;
import org.flintparticles.twoD.initializers.*;
import org.flintparticles.twoD.renderers.*;
import org.flintparticles.twoD.zones.*;

var emitter:Emitter2D = new Emitter2D();
var HCenter:Number = stage.stageWidth/2;
var VCenter:Number = stage.stageHeight/2;
var startRadiusMax:Number = stage.stageWidth+30;
var startRadiusMin:Number = stage.stageWidth+10;

emitter.counter = new Blast( 400 );
emitter.addInitializer( new ImageClass( Dot, 8 ) );
emitter.addInitializer( new ColorInit( 0xFFFFFFFF, 0xFFFFFFFF ) );
emitter.addInitializer( new CollisionRadiusInit( 7 ) );
emitter.addInitializer( new Position( new DiscZone( new Point( HCenter, VCenter ), startRadiusMax, startRadiusMin ) ) );

emitter.addAction( new Move() );
emitter.addAction( new Collide( 0.1 ) );
emitter.addAction( new GravityWell( 500, HCenter, VCenter, 1000 ) );

var renderer:DisplayObjectRenderer = new DisplayObjectRenderer();
addChild( renderer );
renderer.addEmitter( emitter );

emitter.start();
emitter.runAhead(10);]]>
Make particles decellerate and stop in a circular area http://flintparticles.org/forum/comments.php?DiscussionID=131&Focus=519#Comment_519 2008-11-18T12:35:25+00:00 2010-11-17T11:47:36+00:00 Richard http://flintparticles.org/forum/account.php?u=1 You could try making the gravity well into a ZonedAction, so that it only affects particles that are outside the circle. Also apply some drag so the particles slow down and stop when inside the ... ZonedAction, so that it only affects particles that are outside the circle. Also apply some drag so the particles slow down and stop when inside the circle. If you want to make sure the particles don't overlap, you could add a collide action so that they bounce off each other.]]> Make particles decellerate and stop in a circular area http://flintparticles.org/forum/comments.php?DiscussionID=131&Focus=524#Comment_524 2008-11-18T14:07:40+00:00 2008-11-18T14:07:48+00:00 ifthenelse http://flintparticles.org/forum/account.php?u=105 Thanks Richard for the ZonedAction and drag actions. You saved my job, now it works! ZonedAction and drag actions. You saved my job, now it works!]]> Make particles decellerate and stop in a circular area http://flintparticles.org/forum/comments.php?DiscussionID=131&Focus=644#Comment_644 2009-01-23T03:36:35+00:00 2010-11-17T11:47:36+00:00 mo http://flintparticles.org/forum/account.php?u=145 hi ifthenelse, can you please post your code with the ZonedAction? would be helpful for me to see how you used that, because im new with as3 and flint... thank you so much can you please post your code with the ZonedAction? would be helpful for me to see how you used that, because im new with as3 and flint...
thank you so much]]>