Collision with hollow meshes

I’m finally able to export my custom map, and make Ralph roam through it. However, I have house with a room in the map, and Ralph cannot go inside, even though the door is pretty big (the floor is the same level as outside terrain). Other collisions work as expected.

I’m using chicken r91, Blender 2.48a, Panda 1.6.2. I used no tree generation in the export options, and copy-pasted the collision attributes in my file by hand.

My suspect that the problem is that Ralph uses a Ray for collision. I’ll try soon with a tube or sphere.

The manual says:

“Be aware that the collision algorithm has only limited awareness of scaling transforms applied to CollisionSolids. If unequal scaling is applied between a “from” collider and an “into” collider, unexpected results may occur. In general, strive to have as few scaling transforms applied to your collision solids as possible.”

What if I use geometry for collision and scale the visible objects in Blender?

I’ve given up on the idea of having a hollow room mesh, so I’ve made a room out of 5 flattened cube. Still collision doesn’t work for all meshes, and it seems rather random.

If someone wants to check it out: download

It also contains the blender file.

Ralph checks what he has under his feet, if it’s not ‘terrain’ he jump to the position he was last frame.

If your hause has a floor then that can make Ralph think he steped somewhere he should not.

Also the collision ray is cast from above, if there is something higher it won’t get hit by the ray.

For me the logic in this demo is not the best to use for bumping into walls, I’d use a sphere and a bit mask to let it collide only with walls.

That’s what I used, that’s what’s in the downloadable file as well.

However some walls just won’t collide for no good reason, others will . (I fiddled with scaling, but that’s not the solution; not always) I fixed it by deleting the objects that don’t collide and recreated (just the walls had problems; they came from cubes). I think the collision system is quite buggy. (Or the export system for collision?)

The other thing that bothered me was that if I use collision octrees, Ralp won’t move (won’t collide with floor). I called “showAllDescendants()” for the environment, and only 1 wallmesh showed up, no floor. Does Chicken only create Octree for one mesh, not all selected? (Otherwise, with no tree generation, I can export multiple meshes at once.)

bump