Allow to create concave collision meshes. Note that this is only supported for static (mass 0) multibodies.

This commit is contained in:
Erwin Coumans
2017-06-23 14:43:28 -07:00
parent a136098120
commit 2ab56b4d62
5 changed files with 111 additions and 40 deletions

View File

@@ -5008,7 +5008,7 @@ static PyObject* pybullet_createCollisionShape(PyObject* self, PyObject* args, P
pybullet_internalSetVectord(planeNormalObj,planeNormal);
shapeIndex = b3CreateCollisionShapeAddPlane(commandHandle, planeNormal, planeConstant);
}
if (shapeIndex && flags)
if (shapeIndex>=0 && flags)
{
b3CreateCollisionSetFlag(commandHandle,shapeIndex,flags);
}
@@ -7275,6 +7275,8 @@ initpybullet(void)
PyModule_AddIntConstant(m, "GEOM_PLANE", GEOM_PLANE);
PyModule_AddIntConstant(m, "GEOM_CAPSULE", GEOM_CAPSULE);
PyModule_AddIntConstant(m, "GEOM_FORCE_CONCAVE_TRIMESH", GEOM_FORCE_CONCAVE_TRIMESH);
SpamError = PyErr_NewException("pybullet.error", NULL, NULL);