Fix issue : the scaling factor was not used when recomputing AABB tree for concave mesh shape

This commit is contained in:
Daniel Chappuis 2017-11-08 21:26:15 +01:00
parent 013431487e
commit 8bfa6dd137

View File

@ -57,6 +57,11 @@ void ConcaveMeshShape::initBVHTree() {
// Get the triangle vertices
triangleVertexArray->getTriangleVertices(triangleIndex, trianglePoints);
// Apply the scaling factor to the vertices
trianglePoints[0] *= mScaling.x;
trianglePoints[1] *= mScaling.y;
trianglePoints[2] *= mScaling.z;
// Create the AABB for the triangle
AABB aabb = AABB::createAABBForTriangle(trianglePoints);