diff options
Diffstat (limited to 'source/gameengine/Physics/Bullet/CcdPhysicsController.cpp')
-rw-r--r-- | source/gameengine/Physics/Bullet/CcdPhysicsController.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp index a49814e86b6..8fd89295b03 100644 --- a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp +++ b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp @@ -767,6 +767,8 @@ bool CcdShapeConstructionInfo::SetMesh(RAS_MeshObject* meshobj, bool polytope) // assume no shape information m_shapeType = PHY_SHAPE_NONE; m_vertexArray.clear(); + m_polygonIndexArray.clear(); + m_meshObject = NULL; if (!meshobj) return false; @@ -833,6 +835,7 @@ bool CcdShapeConstructionInfo::SetMesh(RAS_MeshObject* meshobj, bool polytope) m_vertexArray.push_back(vertex0); m_vertexArray.push_back(vertex1); m_vertexArray.push_back(vertex2); + m_polygonIndexArray.push_back(p2); numvalidpolys++; } if (poly->VertexCount() == 4) @@ -849,6 +852,7 @@ bool CcdShapeConstructionInfo::SetMesh(RAS_MeshObject* meshobj, bool polytope) m_vertexArray.push_back(vertex0); m_vertexArray.push_back(vertex1); m_vertexArray.push_back(vertex2); + m_polygonIndexArray.push_back(p2); numvalidpolys++; } } @@ -861,6 +865,7 @@ bool CcdShapeConstructionInfo::SetMesh(RAS_MeshObject* meshobj, bool polytope) m_shapeType = PHY_SHAPE_NONE; return false; } + m_meshObject = meshobj; return true; } |