[3D] Revolving particles

6 views
Skip to first unread message

carlos.lunetta

unread,
Apr 19, 2010, 1:18:58 PM4/19/10
to Stardust Particle Engine
Hello all

I'm looking for a way to create a revolving particle field.

The easiest way to do it is to revolve the camera (like the demos),
but it creates a lot of problems in my project; the camera must stand
still.

I tried revolving only the field (like rotating a displayObject) but
it does not work (and wouldn't be the best solution)

Therefore, I'm looking for a way to make particles to revolve around a
center point (like an electron revolving around the nucleus). I
couldn't find a suitable action; the vortex example almost does it,
but particles fly away - every time I add a gravity component, they go
away.

The idea is for them to remain on screen, alive.

What would be the best way to achieve this?

Thanks a lot!


--
Subscription settings: http://groups.google.com/group/stardust-particle-engine/subscribe?hl=en

Allen Chou

unread,
Apr 19, 2010, 11:11:16 PM4/19/10
to stardust-par...@googlegroups.com
You might want to create an Action3D that makes use of the Vec3D.rotate() method provided in the idv.cjcat.stardust.threeD.geom package. It allows you to calculate the coordinate of a 3D point rotated about an arbitrary axis.

Here's the documentation page for the method:
http://stardust-particle-engine.googlecode.com/svn/trunk/docs/index.html

You can create an initializer, and assigns a "rotation axis (a Vec3D object)" property to the Particle.dictionary property as I mentioned in your previous post. Next, create an Action3D that rotates the position of a particle around its rotation axis.

carlos.lunetta

unread,
Apr 20, 2010, 9:23:45 AM4/20/10
to Stardust Particle Engine
Thanks a lot, I'll try that!

Allen Chou

unread,
Apr 20, 2010, 9:48:36 AM4/20/10
to stardust-par...@googlegroups.com
Oops, I gave the wrong link. That's the documentation home page.

This one is the documentation for the Vec3D.rotate() method:
http://stardust-particle-engine.googlecode.com/svn/trunk/docs/idv/cjcat/stardust/threeD/geom/Vec3D.html
Reply all
Reply to author
Forward
0 new messages