Love the tracking Camera, very simple and efficient …

:slight_smile: Just wanted to say thanks!

I’ve been putting off Panda3d until 1.1 comes out but decided to look over what you’ve made.

It really helps to see some example code. Learned quite a bit from it.

Thanks for the effort.


Thanks for posting this! I ran into one problem running this on linux:
Traceback (most recent call last):
File “room.py”, line 35, in ?
from direct.gui.DirectGUI import * # 2D GUI elements
File “/usr/lib/python2.4/ihooks.py”, line 405, in import_module
m = self.load_tail(q, tail)
File “/usr/lib/python2.4/ihooks.py”, line 458, in load_tail
raise ImportError, "No module named " + mname
ImportError: No module named direct.gui.DirectGUI

The problem is fixed by changing the capitalization on this line:
from direct.gui.DirectGUI import *
To this:
from direct.gui.DirectGui import *


Is there any reason why you built your room out of separate pieces instead of one complete poly model?

Also, you include the DirectGui (for 2d work) into your tutorial but the tutorial I played didn’t have any 2d effects. Could this just have been left off?

Also, mentions fog in the tutorial. What use does fog have? Or is it once again just there because it can be, for practice?



P.S. The poster above Zovirl… I believe you are noticing the difference between how UNIX (Linux) is case sensitve and Windows is not. Am I correct?

Yes, the problem I mentioned is because Linux is case sensitive. Fortunately the fix is easy :slight_smile:

Looks very nice.

Just one thingy,

When you move around with tiny, your code changes her position in the right direction. This hapens every frame so you get continues movement. But on some pc’s framerate is higher then your own, causing tiny to move around awefully fast, or very slow.

dt = globalClock.getDt() #Elapsed time since last frame in seconds.
dist = self.speed * dt # regular movement based on frametime
angle = self.getH()*math.pi/180.0
dx = dist*math.sin(angle)
dy = dist*-math.cos(angle)

Hi, I’m a complete panda3d newbie.

I’m using 1.1.0 and it looks like line 258 needs to be changed from

return ( cNode, collSphereStr )


return ( cNodepath, collSphereStr )

to get the script to run. The camera drifts off into the netherworld when I run the script though and I’ve been looking at cameraFollowTask() but I can’t figure out why.

Also, could the colliding() code be replaced with the pusher collision handler?

I tried changing the collision code to use a pusher:

pusher = CollisionHandlerPusher()

pusher.addCollider(self.tinyColl[0],self.tiny, base.drive.node())

It seems to work pretty well, there was a bit of jitter before.

Thanks for the great tutorial!

I am also having problems running this with Panda 1.1.0, on WinXP.

What changes to I have to make to make this tutorial works?
Thanks in advance!

Here’s the error dump:

  File "room.py", line 775, in ?
    app = application( ) # create an instance of our application class
  File "room.py", line 139, in __init__
    base.cTrav.addCollider( self.tinyColl[0], self.collHandEvent )
TypeError: CollisionTraverser::add_collider() argument 1 must be NodePath, not CollisionNode

Please read this.
In Step2 you will find the answer how to fix your problem.
If you dont understand how to do it I’ll try to help you


Is there a reason you only allowed the modified code for 24 hours?

are we being punished?

A good section would be the showcase :slight_smile:

would be nice to see the work updated - it contains a handfull of hints how things to do. :slight_smile:

Regards, Bigfoot29

Hello, I’m new here, I am from Brazil and I am starting using Panda3D, I would like to do your tutorial but I couldn’t find it, where can I read it? Thanks in advance.

I am a bit of a newb, doing a few tutorials per day. I noticed that the last update was in 2006 on the thread mentioned above: the “here” hyper link. It’s extremely difficult to understand, and I worry that updating as specified in the “here” hyper link will potentially downgrade my version of Panda. It looks like it’s asking me to change some of the modules?
Anyway, I would like to know if it’s going to work for the error described above, still, guys? I don’t really want to spend a lot of time on a tangent if the fix is outdated. I’d really like to see this example working and get more info on collisions and walk cycles, though. Please consider my response. ^^ Please update for Panda 1.5.3. ^^

Dude,do you mean you could download the file?for me it gives a broken link :frowning: