Physics and collisions

I am a newbie in Panda3d and 3d graphics. And I didn’t understand how to detect collisions and work with physics (this is not described well in manual). Where can I get simple tutorials and well-commented samples about collisions, panda physics and ode physics?

Sorry for my bad English.


As someone who is still a Panda3D noob, I can say for certain you’ll want to take the problems one step at a time; I would suggest first wrapping your head around collisions, then giving physics a shot to understand the basic principles, and then moving on to ode. I personally, after messing up a lot with physics, decided to stick with collisions and pseudophysics-gimmicks until my coding is more solid.

That said, Panda3D comes with some sample programs, though I personally find that they are only useful if you’ve already got a basic grasp of coding in Panda3D. Among these, relevant ones are Roaming Ralph and Ball In Maze.

Another very useful starting point would be astelix’s series of tutorials, which you can find here: … sc&start=0

I personally used these and, though they were at times a little difficult, I found they helped a lot. He also delves into physics somewhat, which should also interest you.

The manual, I find, is great for explaining how things work, but code samples are best for understanding how to get things done in the first place. Examining and adapting these sample programs, in conjunction with frequent manual consultations to understand the code when you find it’s not commented enough, should help you a great deal. I don’t know of any full, step-by-step tutorials, but with what I mentionned above, you ought to have a solid start. Happy programming! :smiley:

P.S. Your English is fine!

“Roaming Ralph” sample doesn’t work - I can see only black screen. But “ball in maze” sample working fine and it has well-commented source. Thank you.

Thank you. It is useful.

Hm, now that’s odd. I probably won’t be much help in figuring out why it isn’t working, but I’ll give it a shot, until someone more experienced comes along. Are you using Panda 1.7.0? Are there any error messages? Try running it via the command prompt instead of using the Runtime, to see if any error messages appear in the console.

I am using Panda 1.6.2. And I always run all samples from command prompt. Program doesn’t print any error messages. All program output:

DirectStart: Starting the game.
Known pipe types:
(all display modules loaded.)

Information about my system:
OS: Debian GNU/Linux Lenny 5.0
CPU: Intel Celeron 1.8 Ghz
GPU: NVIDIA GeForce 4 MX 440 AGP 8x (Driver version 96.43.16)
Python version: Python 2.5.5

It is odd that Roaming Ralph doesn’t work. Is it consistently black? You could test whether it is a driver issue by forcing Panda to render in software only with:

load-display tinydisplay

in your Config.prc file.


Yes, it is.

It didn’t help.

Really? Did it change the launching text, so that it names TinyXGraphicsPipe instead of glxGraphicsPipe? (If not, then the change to Config.prc didn’t take for some reason.)

Are you sure that the sample has been correctly installed?