From 85ced9bac3b337951680590552676868bf35f21d Mon Sep 17 00:00:00 2001 From: Matthew Amato Date: Wed, 19 Oct 2016 16:49:40 -0400 Subject: [PATCH] Fix updateBatchTableBoundingSpheres updateBatchTableBoundingSpheres was using the BoundingSphere center without applying the modelMatrix to the sphere first. Fixes #4431 and #4428 --- Source/Scene/Primitive.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/Scene/Primitive.js b/Source/Scene/Primitive.js index 4aa6975e3c51..93a1ee6821c1 100644 --- a/Source/Scene/Primitive.js +++ b/Source/Scene/Primitive.js @@ -1193,6 +1193,8 @@ define([ for (var i = 0; i < length; ++i) { var boundingSphere = boundingSpheres[i]; + var modelMatrix = defaultValue(primitive.modelMatrix, Matrix4.IDENTITY); + boundingSphere = BoundingSphere.transform(boundingSphere, modelMatrix, boundingSphere); var center = boundingSphere.center; var radius = boundingSphere.radius;