Spaceship / Thruster Tutorial

Hello guys,

a) is there a spaceship / thruster example or tutorial around to download !?

b) is there a skybox example around for download ?

Thanks, Bernd

Hey Will,

In the sample programs zip for panda, there’s a Task tutorial called Tut-Asteroids, that has a nice example of doing some simple thruster style controls in 2d.
As for a skybox, if you can manage to make one yourself (in blender or maya), and get it into egg format. There’s some discussion on this here
discourse.panda3d.org/viewtopic.php?t=562
Anywho, if you have a model, say SkyBox.egg, with normals pointing inwards, you could do the following:


import direct.directbase.DirectStart

skyBox=loader.loadModel("SkyBox.egg")
skyBox.reparentTo(render)
run()

The only problem with this is that you can move close to the skybox.
So, you would probably want to put a task on it to keep it away from the camera.


import direct.directbase.DirectStart
from direct.task import Task

skyBox=loader.loadModel("SkyBox.egg")
skyBox.reparentTo(render)

largeEnoughToLookGood=<up to you>
skyBox.setScale(largeEnoughToLookGood)

def keepAwayTask(task):
      camPos=camera.getPos(render)
      #make sure the skybox doesn't move if we jump
      camPos.setZ(0)
      skyBox.setPos(camPos)
      return Task.cont

taskMgr.add(keepAwayTask,"keep the sky away from you")
run()

Thanks for the skybox tips !!

Comming back to my thruster question, I wanted to find an example of parenting a particle thruster to my space ship. So, if my ships flys around space, the thruster should eject particles.

Thanks again
Bernd