diff --git a/src/user/user_model.cc b/src/user/user_model.cc index 9fe4113a..db330026 100644 --- a/src/user/user_model.cc +++ b/src/user/user_model.cc @@ -4243,8 +4243,9 @@ void mjCModel::TryCompile(mjModel*& m, mjData*& d, const mjVFS* vfs) { // mark meshes that need convex hull for (int i=0; imesh && - (geoms_[i]->spec.type==mjGEOM_MESH || geoms_[i]->spec.type==mjGEOM_SDF) && - (geoms_[i]->spec.contype || geoms_[i]->spec.conaffinity)) { + (geoms_[i]->spec.type == mjGEOM_MESH || geoms_[i]->spec.type == mjGEOM_SDF) && + (geoms_[i]->spec.contype || geoms_[i]->spec.conaffinity || + geoms_[i]->mesh->spec.inertia == mjINERTIA_CONVEX)) { geoms_[i]->mesh->SetNeedHull(true); } } diff --git a/test/user/testdata/inertia_compare.xml b/test/user/testdata/inertia_compare.xml index f59d1199..d497809d 100644 --- a/test/user/testdata/inertia_compare.xml +++ b/test/user/testdata/inertia_compare.xml @@ -12,7 +12,7 @@ - +