Miroku_87
12-11-2010, 08:58 AM
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 =)
Hope this is the right forum.
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 =)
Hope this is the right forum.