Flint Particle System Forum - Automatic Orbit2012-05-26T06:54:19+01:00http://flintparticles.org/forum/
Lussumo Vanilla & Feed Publisher
Automatic Orbithttp://flintparticles.org/forum/comments.php?DiscussionID=540&Focus=1794#Comment_17942011-12-01T17:28:57+00:002011-12-01T17:53:41+00:00Frinkkyhttp://flintparticles.org/forum/account.php?u=574
I just stumbled across Flint last night. I'm certainly no as3 developer (I tend to get roped into flash work once a year by one particular client for their e-cards). I have enjoyed experimenting with ...
Anyway, I've a 3D scene where a xmas tree is generated out of static particles. I needed to set up an automated orbit. My current solution users a timer to update the orbit amount:
var timer:Timer = new Timer(41.6667); var count:int = 31.622776601683793319988935444327; var fcount:int = 0;
function incrementCounter(event:TimerEvent) { count++; if (fcount < 7.5) { fcount=int(count*count/1000); } if (fcount >= 7.5) { fcount=7.5; } treeRenderer.camera.orbit(fcount/360); }
It's not particularly efficient and seems quite processor intensive. Is there a better solution?
On a separate subject, I initially tried combining 2 twoD scenes and a threeD scene in one project, but received an error about not being able to convert threeD zones into twoD zones:
TypeError: Error #1034: Type Coercion failed: cannot convert org.flintparticles.threeD.zones::ConeZone@28c8b281 to org.flintparticles.twoD.zones.Zone2D.
Is this actually possible and if so, what is the usual process?
This query isn't so important because importing an external swf that contains the 3D scene works just as well for this project but it would be good to know.]]>
Automatic Orbithttp://flintparticles.org/forum/comments.php?DiscussionID=540&Focus=1803#Comment_18032011-12-14T19:41:44+00:002012-05-26T06:54:19+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
Hi
Sorry for the delay. I've been working to get a game out before Christmas.
Flint has an orbit controller for the camera. This orbits the camera in responser to user input - pressing the left ...
Sorry for the delay. I've been working to get a game out before Christmas.
Flint has an orbit controller for the camera. This orbits the camera in responser to user input - pressing the left and right cursor keys orbit the camera. If you pick that code apart (there's not much of it) you should find what you're after. Here it is on Github https://github.com/richardlord/Flint/blob/master/src/org/flintparticles/threeD/renderers/controllers/OrbitCamera.as.]]>
Automatic Orbithttp://flintparticles.org/forum/comments.php?DiscussionID=540&Focus=1804#Comment_18042011-12-14T19:47:42+00:002012-05-26T06:54:19+01:00Richardhttp://flintparticles.org/forum/account.php?u=1
P.S. It should be possible to use 2d and 3d effects in the same swf, but you have to be careful about package names. Some items in the 2d and 3d packages have the same name, so if they're used in teh ...
Your error message seems to relate to using a 3d zone where a 2d zone is expected, wither because you meant to use a 2d zone (there is no 2D ConeZone) or because the item that uses the zone (e.g. the Position initializer) is supposed to be the 3d version but is in fact the 2d version. If you can't fix it by correcting the imports to use the correct version, specify the exact version by adding the full path like this...
emitter.addInitializer( org.flintparticles.threeD.initializers.Position( ... ) );]]>
Automatic Orbithttp://flintparticles.org/forum/comments.php?DiscussionID=540&Focus=1814#Comment_18142011-12-15T19:55:15+00:002012-05-26T06:54:19+01:00Frinkkyhttp://flintparticles.org/forum/account.php?u=574
Hi Richard,
Thanks for the replies. I found moving to a DisplayObjectRenderer gave reasonable performance for that particular scenario (a ConeZone with 500 static particles inside, representing a ...
Thanks for the replies. I found moving to a DisplayObjectRenderer gave reasonable performance for that particular scenario (a ConeZone with 500 static particles inside, representing a xmas tree). I will have a crack at your suggestion just to appease my own curiosity.]]>