Flint Particle System Forum - Individual Particle Rotation in 2D Sun, 11 Dec 2011 12:25:56 +0000 http://flintparticles.org/forum/ Lussumo Vanilla 1.1.10 & Feed Publisher Individual Particle Rotation in 2D http://flintparticles.org/forum/comments.php?DiscussionID=441&Focus=1501#Comment_1501 http://flintparticles.org/forum/comments.php?DiscussionID=441&Focus=1501#Comment_1501 Tue, 04 Jan 2011 05:51:01 +0000 ven -ven

// create particles from our existing objects
var particles:Array = Particle2DUtils.createParticles2DFromDisplayObjects( squares);

// add particles
emitter.addExistingParticles( particles, false );

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

// set up the explosion - good to play with explosion strenght, depth and epsilon
emitter.addAction(new Explosion(5, (INIT_X + (width + SPC) * 4) - ((width + SPC) / 2), (INIT_Y + (height + SPC) * 4 ) - ((height + SPC) / 2), 300, 2)); // set up explosion

emitter.addInitializer( new RotateVelocity( 0, Math.PI / 2) );
emitter.addAction( new Rotate() );
emitter.addAction( new Move() ); // set to objects to move

emitter.start(); ]]>
Individual Particle Rotation in 2D http://flintparticles.org/forum/comments.php?DiscussionID=441&Focus=1502#Comment_1502 http://flintparticles.org/forum/comments.php?DiscussionID=441&Focus=1502#Comment_1502 Tue, 04 Jan 2011 18:13:55 +0000 Richard
You need to set up the emitter first, with its initializers and actions. Then add the particles, setting the second parameter in the addExistingParticles method to true to indicate that the initializers should be applied to the particles. Then start the emitter. ]]>