Fixed bug with created too many faces.
This commit is contained in:
parent
1c2fbc2e91
commit
7d3d7927fe
@ -177,7 +177,7 @@ void Physics::addTriangleMeshBody(Entity entity, std::string path, float mass, f
|
|||||||
//finally start making body
|
//finally start making body
|
||||||
btTriangleMesh* triMesh = new btTriangleMesh();
|
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]]);
|
triMesh->addTriangle(temp_vertices[vertexIndices[i]],temp_vertices[vertexIndices[i-1]],temp_vertices[vertexIndices[i-2]]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user