Hi, I am trying to create a 3D scan, I read the best way to do this is using several boxes and use the collision system to detect if they are in contact with the geometry of a given model.
I tried this with panda 3d, but I am facing some problems.
My first approach was using the default collision system, but I found that collision boxes won’t collide with the geom. So I tried using Bullet system, but I it seems a bit bugged, I am using the panda model of the hello world example for my tests.
The problem is that i detects collision on boxes that are absolutely empty! I removed the scales, but the problem persists.
Here is how I set up the triangle mesh:
geomNodes = model.findAllMatches('**/+GeomNode') geomNode = geomNodes.getPath(0).node() geom = geomNode.getGeom(0) mesh = BulletTriangleMesh() mesh.addGeom(geom, True) self.meshNode = BulletRigidBodyNode('Mesh') meshShape = BulletTriangleMeshShape(mesh, dynamic = False) self.meshNode.addShape(meshShape) self.meshNodePath = base.render.attachNewNode(self.meshNode) self.meshNodePath.setCollideMask(MasksConstants.scenarioMask)
Anything obsously wrong with this approach?