Physics

The Physics engine is only very sparsely documented in the manual. Can anyone provide a worked example of code using physics objects and the PhysicsCollisionHandler? A simple pool table, for instance?

Malcolm

After a bit of fiddling with the google box (see my other post) I dug up a link to an old thread on this topic.

Malcolm

How complex is the PhysicsCollisionHandler? Does it handle collisions between two or more moving objects? Does it take into account mass and momentum? I’m assuming that it doesn’t do anything like calculating rotational effects of collisions (for which you’d need to know the centres of mass of the colliding objects).

Malcolm

Hi Malcolm,

I just thought I’d pop in and let you know that sometimes it takes a while for either David from Disney VR or Josh Yelon from the ETC to respond. I’m sure there are others about as well that can answer your question but as you’ll see by the posts in this forum they are our best resources on Panda3d.

Just don’t get discouraged I guess is what I’m trying to say if the post goes unanswered for a while :slight_smile:

I read in another post of yours that you looked at Torque. I also use Torque and another engine called C4. I’m still learning here myself. I keep coming back because of Python.

The community is growing here and its taking me longer to get up-to-speed with Panda3d then I initially thought so I’m afraid I’m limited to what I can help out with at the moment.

Steve

The PhysicsCollisionHandler is quite simple. It doesn’t do any of these fancy things; all it does is update the velocity of the moving object that detects the collision. For this it does consider mass and momentum, at least of the moving object. It doesn’t impart any velocity to the object that was struck. It does at least work with collisions between two or more moving objects, in the sense that each of them will detect the collision and update their velocity accordingly, but it won’t necessary give you the most physically accurate result (so I wouldn’t recommend using it to simulate a billiard game, for instance).

The Panda physics engine is suitable for very simple games with cartoon-type physics, but if you’re looking for highly realistic physics you’ll need to use a third-party physics engine.

David

Thanks That was the impression I got. It will probably do for the class. And if they want something more complex like PyODE, I can point them that way.

Malcolm

PS: Just to follow up what sm3 said, I don’t think you’ve been at all slow in answering questions. I’m in a different timezone after all. I don’t expect immediate responses. I don’t even expect next-day responses, although they’re nice. Please don’t take my multiple posting as a sign of impatience. I tend to post a question early and then continue to work on the problem.

And I’m just appreciative that they respond at all!