Fixed bug with created too many faces.

This commit is contained in:
Steffen Fündgens 2014-12-19 15:20:05 +01:00
parent 9deaf22bca
commit 2d4e590308

View File

@ -177,7 +177,7 @@ void Physics::addTriangleMeshBody(Entity entity, std::string path, float mass, f
//finally start making body
btTriangleMesh* triMesh = new btTriangleMesh();
for(unsigned i = 2; i < vertexIndices.size();i++)
for(unsigned i = 2; i < vertexIndices.size();i+=3)
{
triMesh->addTriangle(temp_vertices[vertexIndices[i]],temp_vertices[vertexIndices[i-1]],temp_vertices[vertexIndices[i-2]]);
}