From 8bfa6dd137d49e448cc5a5565e5deffac6b8388c Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Wed, 8 Nov 2017 21:26:15 +0100 Subject: [PATCH] Fix issue : the scaling factor was not used when recomputing AABB tree for concave mesh shape --- src/collision/shapes/ConcaveMeshShape.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/collision/shapes/ConcaveMeshShape.cpp b/src/collision/shapes/ConcaveMeshShape.cpp index 84e95e2c..566b7bc4 100644 --- a/src/collision/shapes/ConcaveMeshShape.cpp +++ b/src/collision/shapes/ConcaveMeshShape.cpp @@ -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);