Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorMiroku_87
- CommentTimeDec 8th 2010 edited
Hi everyone,
I would like to make a 3D column of light with squared base.
I began editing the FireSmoke example and since I want just the outline of the squared base to emit particle I have started doing this:var fire:Emitter3D = new Emitter3D();
fire.counter = new Steady( 60 );
fire.addInitializer( new Lifetime( 2, 3 ) );
var multiZ:MultiZone = new MultiZone();
var yy:Number = 0;
multiZ.addZone(new LineZone(new Point3D(-50,yy,-50), new Point3D(50,yy,-50)));
multiZ.addZone(new LineZone(new Point3D(50,yy,-50), new Point3D(50,yy,50)));
multiZ.addZone(new LineZone(new Point3D(50,yy,50), new Point3D(-50,yy,50)));
multiZ.addZone(new LineZone(new Point3D(-50,yy,50), new Point3D(-50,yy,-50)));
var multiZ2:MultiZone = new MultiZone();
yy = 10;
multiZ2.addZone(new LineZone(new Point3D(-50,yy,-50), new Point3D(50,yy,-50)));
multiZ2.addZone(new LineZone(new Point3D(50,yy,-50), new Point3D(50,yy,50)));
multiZ2.addZone(new LineZone(new Point3D(50,yy,50), new Point3D(-50,yy,50)));
multiZ2.addZone(new LineZone(new Point3D(-50,yy,50), new Point3D(-50,yy,-50)));
fire.addInitializer( new Velocity( multiZ ) );
fire.addInitializer( new Position( multiZ2 ) );
fire.addInitializer( new SharedImage( new FireBlob() ) );
fire.addAction( new Age( ) );
fire.addAction( new Move( ) );
fire.addAction( new LinearDrag( 1 ) );
fire.addAction( new Accelerate( new Vector3D( 0, 40, 0 ) ) );
fire.addAction( new ColorChange( 0xFFFFCC00, 0x00CC0000 ) );
fire.addAction( new ScaleImage( 1, 1.5 ) );
fire.addAction( new RotateToDirection() );
fire.start( );
Now my problem is this: I want light particles to move just on Y axis with no other movement on the other axis.
How do I do this?
Thank you in advance =) -
- CommentAuthorMiroku_87
- CommentTimeDec 10th 2010
No one? -
- CommentAuthorRichard
- CommentTimeDec 20th 2010
If you want them to only move on the Y axis, you need to set a velocity that only has a Y component. The easiest way to do that is with a PointZone.fire.addInitializer( new Velocity( new PointZone( new Point3D( 0, -10, 0 ) ) ) ); -
- CommentAuthorMiroku_87
- CommentTimeDec 22nd 2010
In this way I can't have a rectangular base =\ -
- CommentAuthorMiroku_87
- CommentTimeDec 22nd 2010
Oops.... I was wrong!
THANK YOU VERY MUCH ;)
1 to 5 of 5
