1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 03:59:56 +00:00

Restore unwrapped Bullet triangle shape shallow copying

This commit is contained in:
Alexei Kotov 2024-01-19 12:53:35 +03:00
parent 6ead5f9321
commit e997c44db6

View file

@ -39,6 +39,13 @@ namespace Resource
const_cast<btBvhTriangleMeshShape*>(trishape->getChildShape()), trishape->getLocalScaling())); const_cast<btBvhTriangleMeshShape*>(trishape->getChildShape()), trishape->getLocalScaling()));
} }
if (shape->getShapeType() == TRIANGLE_MESH_SHAPE_PROXYTYPE)
{
const btBvhTriangleMeshShape* trishape = static_cast<const btBvhTriangleMeshShape*>(shape);
return CollisionShapePtr(new btScaledBvhTriangleMeshShape(
const_cast<btBvhTriangleMeshShape*>(trishape), btVector3(1.f, 1.f, 1.f)));
}
if (shape->getShapeType() == BOX_SHAPE_PROXYTYPE) if (shape->getShapeType() == BOX_SHAPE_PROXYTYPE)
{ {
const btBoxShape* boxshape = static_cast<const btBoxShape*>(shape); const btBoxShape* boxshape = static_cast<const btBoxShape*>(shape);