Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/gameengine/Physics/Bullet/CcdPhysicsController.cpp')
-rw-r--r--source/gameengine/Physics/Bullet/CcdPhysicsController.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp b/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
index d6a32dfd9c0..2ec96c75a68 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;
@@ -838,6 +840,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)
@@ -857,6 +860,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++;
}
}
@@ -869,6 +873,7 @@ bool CcdShapeConstructionInfo::SetMesh(RAS_MeshObject* meshobj, bool polytope)
m_shapeType = PHY_SHAPE_NONE;
return false;
}
+ m_meshObject = meshobj;
return true;
}