From e997c44db6df01c62882fba5e166e6d9c5143bc5 Mon Sep 17 00:00:00 2001 From: Alexei Kotov Date: Fri, 19 Jan 2024 12:53:35 +0300 Subject: [PATCH] Restore unwrapped Bullet triangle shape shallow copying --- components/resource/bulletshape.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/resource/bulletshape.cpp b/components/resource/bulletshape.cpp index 360b92ffc0..70348e956d 100644 --- a/components/resource/bulletshape.cpp +++ b/components/resource/bulletshape.cpp @@ -39,6 +39,13 @@ namespace Resource const_cast(trishape->getChildShape()), trishape->getLocalScaling())); } + if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE) + { + const btBvhTriangleMeshShape* trishape = static_cast(shape); + return CollisionShapePtr(new btScaledBvhTriangleMeshShape( + const_cast(trishape), btVector3(1.f, 1.f, 1.f))); + } + if (shape->getShapeType() == BOX_SHAPE_PROXYTYPE) { const btBoxShape* boxshape = static_cast(shape);