From 7d3d7927fe506f1973c131691bdb8e697c1f0fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20F=C3=BCndgens?= Date: Fri, 19 Dec 2014 15:20:05 +0100 Subject: [PATCH] Fixed bug with created too many faces. --- physics.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/physics.cc b/physics.cc index dad6de8..86bb33e 100644 --- a/physics.cc +++ b/physics.cc @@ -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]]); }