Skip to content

Commit

Permalink
Fix updateBatchTableBoundingSpheres
Browse files Browse the repository at this point in the history
updateBatchTableBoundingSpheres was using the BoundingSphere center without
applying the modelMatrix to the sphere first.


Fixes #4431 and #4428
  • Loading branch information
mramato committed Oct 19, 2016
1 parent f6a866a commit 85ced9b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Source/Scene/Primitive.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 85ced9b

Please sign in to comment.