REturn margin to shape hull

This commit is contained in:
tovjemam 2026-01-22 00:58:48 +01:00
parent 86c40671b6
commit 7d490d20f3

View File

@ -133,10 +133,8 @@ std::shared_ptr<const assets::Model> assets::Model::LoadFromFile(const std::stri
{
temp_hull->recalcLocalAabb();
// Optional but recommended
auto shape_hull = std::make_unique<btShapeHull>(temp_hull.get());
// shape_hull->buildHull(temp_hull->getMargin());
shape_hull->buildHull(0.01f);
shape_hull->buildHull(temp_hull->getMargin());
model->cshape_ = std::make_unique<btConvexHullShape>((btScalar*)shape_hull->getVertexPointer(), shape_hull->numVertices(), sizeof(btVector3));
}