The problem ist that the geom you pick from the loaded model has a transform, which you not regard when creating the collision mesh:
...
<Group> Root {
<Transform> {
<Matrix4> {
1 0 0 0
0 0 1 0
0 1 0 0
0 0 0 1
}
}
<Group> Root1 {
...
Good luck that you .egg file only contains one geom, because you only regard the very first geom found inside the .egg file.
This is a more complete ways of creating collision meshes from models:
np = loader.loadModel('map.egg')
mesh = BulletTriangleMesh()
for geomNP in np.findAllMatches('**/+GeomNode'):
geomNode = geomNP.node()
ts = geomNP.getTransform(np)
for geom in geomNode.getGeoms():
mesh.addGeom(geom, ts)
shape = BulletTriangleMeshShape(mesh, False)
...
Anyway, it might be very convenient to simply create collision meshes from visible models. And Bullet and PhysX can do collision detection with triangle meshes quite fast, but I still recommend using simplified meshes for collisions.