From 7d7db65fd1550c0944c962c9a0313a69ea153b49 Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Fri, 12 Jun 2015 11:42:38 -0700 Subject: [PATCH] fix avatar mesh boxes not staying in sync with avatar position --- libraries/render-utils/src/Model.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 2379058b92..865c225445 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -1783,8 +1783,13 @@ AABox Model::getPartBounds(int meshIndex, int partIndex) { // // return calculateScaledOffsetAABox(_calculatedMeshPartBoxes[QPair(meshIndex, partIndex)]); // + // NOTE: we also don't want to use the _calculatedMeshBoxes[] because they don't handle avatar moving correctly + // without recalculating them... + // return _calculatedMeshBoxes[meshIndex]; + // // If we not skinned use the bounds of the subMesh for all it's parts - return _calculatedMeshBoxes[meshIndex]; + const FBXMesh& mesh = _geometry->getFBXGeometry().meshes.at(meshIndex); + return calculateScaledOffsetExtents(mesh.meshExtents); } return AABox(); }