CollisionHandlerFloor

I’m trying to make a number of objects move around on uneven terrain, but I’m having trouble getting them to collide with the ground. I made the terrain in 3d Studio Max and added a Collide tag to the egg file so that it reads

environment {
“Scene Root” {
ground_collide {
ground_collide {polyset keep}
ground_collide.verts {

and I set the geometry in my loadModels function as

self.env = loader.loadModel("ground")
self.ground = self.env.find("**/ground_collide")
self.ground.reparentTo(render)
self.ground.node().setIntoCollideMask(BitMask32(0x4))

with the models’ CollisionRay collide-into masks set as allOff() and collide-from masks as 0x4.

I can attach CollisionSolids to the ground model within Panda and the objects will respond to that, but they ignore the collision geometry that I set in the egg file. Does it seem like the problem is in the way I handle the models in my code, or the way I set the tag in the egg file? I read the egg syntax documentation but as far as I can tell I have the right line added to the egg file.

Hi, check out this thread…I beleive it has what you may need:

discourse.panda3d.org/viewtopic.php?t=2235

good luck

Yes, that is helpful. Thank you very much!

Does this mean that it’s better to write your own handler for complex floor geometry than use CollisionHandlerFloor, or is it because I have multiple colliders that it’s easier to use a CollisionHandlerQueue to handle them all?

Glad I could help,
Unfortunately I am really new to Panda & Python in general but I have found so far that with multiple colliders I have had more success (stability, responses etc) with using a Queue handling geometry written in the egg file than the HandlerFloor. Sorry I cannt offer more. Keep me posted too if you find anything out.