1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-19 17:09:42 +00:00

Merge branch 'trianglemeshshape' into 'master'

Restore unwrapped Bullet triangle shape shallow copying

See merge request OpenMW/openmw!3788
This commit is contained in:
psi29a 2024-01-20 11:56:03 +00:00
commit 3f94e07cda

View file

@ -39,6 +39,13 @@ namespace Resource
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)
{
const btBoxShape* boxshape = static_cast<const btBoxShape*>(shape);