Flint Particle System Forum - 3D GravityWell2011-06-23T13:13:07+01:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
3D GravityWellhttp://flintparticles.org/forum/comments.php?DiscussionID=286&Focus=1005#Comment_10052009-12-06T15:56:12+00:002011-06-23T13:13:07+01:00lee_plentyhttp://flintparticles.org/forum/account.php?u=284
Hi,
I'm trying to build a 3D version of the GravityWell. I've used to code provided in the 2D example and used 3D classes instead. I've also looked at the version of sandersnake 3D Globe example. ...
I'm trying to build a 3D version of the GravityWell. I've used to code provided in the 2D example and used 3D classes instead. I've also looked at the version of sandersnake3D Globe example. But unfortunatly, even though the code compiles, it doesn't show anything. I've pasted the code below. Could someone tell me what I'm doing wrong?
public class GravityWells extends Emitter3D { public function GravityWells() { counter = new Random(0, 100);
addInitializer( new ColorInit( 0xFFFF00FF, 0xFF00FFFF ) ); addInitializer( new Position( new SphereZone ( new Point3D(200, 200, 0), 200, 0) ) );
addAction( new Move() ); addAction( new GravityWell(50, new Point3D(200, 200, 0), 200) ); addAction ( new DeathZone( new SphereZone ( new Point3D(200, 200, 0), 200, 0) ) ); } } }]]>
3D GravityWellhttp://flintparticles.org/forum/comments.php?DiscussionID=286&Focus=1009#Comment_10092009-12-14T09:52:21+00:002009-12-14T09:53:20+00:00lee_plentyhttp://flintparticles.org/forum/account.php?u=284
Got it! I think it was because somehow my emitter was not on the right spot....I think. Anyway, with this piece it works as intended:
Main.as:
package
{
import flash.display.Sprite;
import ...
Main.as:
public class GravityWells extends Emitter3D { public function GravityWells() { counter = new Random(0, 500); //counter = new Blast( 500 );
//addInitializer( new ImageClass( Dot, 1 ) ); addInitializer( new ColorInit( 0xFFFF00FF, 0xFF00FFFF ) ); addInitializer( new Position( new SphereZone ( new Point3D(200, 200, 0), 200, 0) ) );
addAction( new Move() ); addAction( new GravityWell(50, new Point3D(400, 400, 0)) ); addAction ( new DeathZone( new SphereZone ( new Point3D(400, 400, 0), 200, 10), true ) ); } } }]]>
3D GravityWellhttp://flintparticles.org/forum/comments.php?DiscussionID=286&Focus=1010#Comment_10102009-12-14T09:52:45+00:002009-12-14T09:53:52+00:00lee_plentyhttp://flintparticles.org/forum/account.php?u=284
-
3D GravityWellhttp://flintparticles.org/forum/comments.php?DiscussionID=286&Focus=1018#Comment_10182009-12-17T08:24:22+00:002011-06-23T13:13:07+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
Glad you found the answer. Three-D is so much more complicated because of camera position, lens angle etc.