Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorstriker
- CommentTimeDec 11th 2011 edited
Hi. Thank you for good Flint particle system!
The question arose as to ask for each new particle set random velocity, for example to obtain cloud-drift?
http://www.kongregate.com/games/Smrdis/collapse-it?acomplete=collapse+it (on game level)
Each new cloud has a different velocity and overtaking each other.
Flint v. 2.2.1 released (flash player 9) -
- CommentAuthorRichard
- CommentTimeDec 14th 2011
The Velocity initializer uses a zone, which is passed to the constructor, to define the initial velocity of the particle. The zone defines a region in 2d or 3d space. For example a circle or a rectangle. When Flint sets the velocity of the particle it picks a random point within that space and uses the vector from the origin to that point as the velocity for the particle. So yes, Flint can and does do random velocities. The only way not to get a random velocity is to use a PointZone with the Velocity initializer.
A few of the examples use zones to set random velocities within controlled parameters, like sparkler, fire & smoke, and the most extreme example logo firework, which uses a picture to define the initial velocity and thus force the particles to create the logo image as they spread out.
1 to 2 of 2
