Use plane-convex for plane-sdf collisions, using the marching cube mesh.

PiperOrigin-RevId: 629437563
Change-Id: Ic7fb6ec8a5c6680dd2c0a71baa7cc78636d478b1
This commit is contained in:
Alessio Quaglino
2024-04-30 09:28:17 -07:00
committed by Copybara-Service
parent 6f97f42458
commit ec84ddb5a4
3 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -3213,7 +3213,8 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, const mjVFS* vfs) {
// mark meshes that need convex hull
for (int i=0; i<geoms.size(); i++) {
if (geoms[i]->mesh && geoms[i]->spec.type==mjGEOM_MESH &&
if (geoms[i]->mesh &&
(geoms[i]->spec.type==mjGEOM_MESH || geoms[i]->spec.type==mjGEOM_SDF) &&
(geoms[i]->spec.contype || geoms[i]->spec.conaffinity)) {
geoms[i]->mesh->set_needhull(true);
}