Flint Particle System Forum - How to spin/rotate a sphere of existing particles in an emitter?2011-12-11T11:11:51+00:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
How to spin/rotate a sphere of existing particles in an emitter?http://flintparticles.org/forum/comments.php?DiscussionID=492&Focus=1656#Comment_16562011-06-23T16:24:17+01:002011-06-24T13:15:41+01:00RPathhttp://flintparticles.org/forum/account.php?u=191
Hello Richard & forum users - I have a (hopefully) simple question that I'm not finding a straightforward answer to elsewhere in the forum or in the example files. I'm trying to make a 3D emitter ...
An example of what I'm going for is here: http://professionalpapervision.wordpress.com/2009/04/22/flash-cs4-planetarium-in-49-lines/ I'll eventually be placing a number of the spheres in 3D space and want them all spinning individually, so using the OrbitCamera isn't an option. "Pure AS3" code follows:
public class Sphere extends Emitter3D { public function Sphere() { counter = new Blast( 250 );
addInitializer( new ColorInit( 0xFFCCCC00, 0xFF00FF00 ) ); addInitializer( new Position ( new SphereZone( new Vector3D( 0, 0, 0 ), 50, 0 ) ) );
addAction( new Move() );
addActivity( new RotateEmitter (new Vector3D(0,10,0),2)); } } }
- Rich P.]]>
How to spin/rotate a sphere of existing particles in an emitter?http://flintparticles.org/forum/comments.php?DiscussionID=492&Focus=1667#Comment_16672011-07-15T17:40:06+01:002011-12-11T11:11:51+00:00Richardhttp://flintparticles.org/forum/account.php?u=1
The only option I can think of is the brute force approach - rotate all the particles. You'll need a transform matrix for the rotation and to apply it to the position vector of each of the particles.