Przeglądaj źródła

Merge pull request #80 from ThunderBeastGames/JME-URHO3D-FIXCOLLISIONSHAPE

Fix collision calculation of index offset when using multiple geometries
Lasse Öörni 12 lat temu
rodzic
commit
76a3cd8ab1
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      Source/Engine/Physics/CollisionShape.cpp

+ 1 - 1
Source/Engine/Physics/CollisionShape.cpp

@@ -115,7 +115,7 @@ public:
             
             btIndexedMesh meshIndex;
             meshIndex.m_numTriangles = indexCount / 3;
-            meshIndex.m_triangleIndexBase = &indexData[indexStart];
+            meshIndex.m_triangleIndexBase = &indexData[indexStart * indexSize];
             meshIndex.m_triangleIndexStride = 3 * indexSize;
             meshIndex.m_numVertices = 0;
             meshIndex.m_vertexBase = vertexData;