6
\$\begingroup\$

Ogre3D

I would like to put some space junk in my game environment. Make it look like the first 2 search results. Those junks don't need to be interactive. Just need to have a 3D junk circling around the earth.

Can the community give some suggestion on how to implement this? Should I use particle in Ogre3D or create entities for those junks, or any other approach? If using particle, how should I make the object still and spread out around the earth? Thanks.

\$\endgroup\$
2
\$\begingroup\$

Particles would be a decent solution. It really depends on how close the player will get to the junk.

For positioning each piece of junk you can generate a random direction vector, and a random float called distance. You would then position that piece of junk at direction * (minimumJunkDistance+distance).

To have it circle the earth I would simple apply trigonometry to have it move on a fixed orbit at a fixed velocity.

I'm not sure if Ogre automatically does this, but it would be nice if the junk fades out before it hits the camera's near plane to stop it from dissapearing suddenly.

| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ Clear and concise, +1 \$\endgroup\$ – jshxe Jan 22 '13 at 19:09
1
\$\begingroup\$

Use an Ellipsoid emitter for your particles.

There is an example of the Ellipsoid here: http://www.ogre3d.org/tikiwiki/ParticleExampleSun&structure=Cookbook

Since you want the particles fixed in space, you will need to experiment with the time_to_live, duration, etc.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.