Hi, I’m new to Panda3D and I’m developing a game that is basically for assembling an object that is made up of 6 different pieces, each one of those with a relative complex geometry. I’m Implementing the collisions/physics and have the following concept questions:

  • I understand that collision against geometry is only good for “into” objects, and since I need to assemble two complex pieces I would need something else for the “from” object, but a simple sphere won’t be good, what can I do in this situation?

  • I was trying to evaluate collisions against geometry (for a “into” object) but there is no a clear explanation in the manual for how to do that, any help?

Sorry if they are basic or stupid questions but I’ve been looking for answers and havent found anywhere

I believe you can add multiple collision solids (sphere, box, capsule, etc.) to a single collision node. This way you can get a closer approximation of the shape of the object.

According to almost the only collision solid that is good for “from” objects is the sphere (besides the rays that are no good for representing an object)

What I’ve not been able to figure out is how to evaluate collisions using the geometry of visible objects. I someone knows how to do it or at least a good source of information I would be very grateful.

There is also a box type solid, though I do not know off-hand if it has the proper tests for use as a “from” object.

You can use visible geometry as an “into” object by setting a collide mask on it (setCollideMask) that has at least one bit matching that of the “from” object, though this will result in much poorer performance than if you export a collision mesh in your EGG file. I believe this causes the mesh to load as CollisionPolygons which are optimized for use in collision detection.

For the best performance, you would have your visible geometry only used for rendering, and in addition an optimized collision geometry that has small details removed from it.

Maybe this thread will be useful for you:
[chicken and collision)

Anyway, I don’t see how a collision for a multipart object is any different from collision for simple object. You check each “from” object individually.