Welcome, Guest
Want to take part in these discussions? Sign in if you have an account, or apply for one below
-
- CommentAuthorreptileaz
- CommentTimeSep 7th 2009 edited
Hi Richard,
First, thanks for the awesome framework. I'm inspired by your technique. :)
I'm working on a simple PV3D/Flint space shooter. So far, the ship's thruster didn't give me much trouble. However, I'm using a particle emitter for the ship's weapon, and have a mysterious green particle appearing at the origin. Am I doing something stupid that could be causing this? Thanks for your help.
http://mattparrett.com/misc/haunted_particle.swf (green particle while Blaster is emitting is unintended, yellow point is intended and used as a camera target)
Here's some code to glance at (abbreviated):
public class Blaster3D extends Emitter3D
{
public function Blaster3D()
{
super();
counter = new Blast(1);
addInitializer( new PV3DObjectClass( Particle, null, 4 ) );
addInitializer( new ColorInit( 0xFF666666, 0xFF666666 ) );
addInitializer( new ApplyMaterial( ParticleMaterial, 0x00FF00, 1, ParticleMaterial.SHAPE_CIRCLE ) );
addInitializer( new Position( new PointZone( new Point3D( 0,0,0) ) ) );
addInitializer( new Velocity( new PointZone( new Point3D( 1200, 0, 0 ) ) ) );
addInitializer( new Lifetime( 1.5 ) );
addAction( new Age() );
addAction( new Move() );
}
}
public class Main extends Sprite
{
public function Main():void {
blaster = new Blaster3D();
flintRenderer.addEmitter( blaster );
addEventListener( Event.ENTER_FRAME, render );
}
}
private function render( ev:Event ):void
{
blaster.position = new Point3D( ship.x, ship.y, ship.z );
if (keysDown[Keyboard.SPACE]) {
blaster.start();
} else {
blaster.stop();
}
}
EDIT: You've already fixed this! http://code.google.com/p/flint-particle-system/source/detail?r=287 but perhaps not for 3D?
Thanks. -
- CommentAuthorRichard
- CommentTimeSep 8th 2009
Hi reptileaz
I have a suspicion what it might be but don't have a suitable project to test it. Are you using the swc or the source code for the library? Can I send you a different version to test if it solves the problem, or can you send me your full example to test with? To send me your email address, either whisper it or use the form on my web site - http://www.bigroom.co.uk/contact
Thanks
Richard -
- CommentAuthorRichard
- CommentTimeSep 10th 2009
Hi Matt
Thank you for sending me your code. It was indeed an equivalent of the DisplayObjectRenderer bug I fixed in the previous release. I've fixed it and checked in the code. Thank you for your help.
Richard -
- CommentAuthorRichard
- CommentTimeSep 10th 2009
P.S. Any Away3D users, I'll check this in Away3D too and check in any fix if required.
1 to 4 of 4
