Skip to content

Commit

Permalink
Fix bounding box for glbs (#769)
Browse files Browse the repository at this point in the history
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
  • Loading branch information
ahcorde committed Nov 29, 2022
1 parent 04b0f03 commit cc8a9ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ogre/src/OgreMeshFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,8 @@ bool OgreMeshFactory::LoadImpl(const MeshDescriptor &_desc)
math::Vector3d max = _desc.mesh->Max();
math::Vector3d min = _desc.mesh->Min();

if (_desc.mesh->HasSkeleton())
if (_desc.mesh->HasSkeleton() &&
_desc.mesh->MeshSkeleton()->AnimationCount() != 0)
{
min = math::Vector3d(-1, -1, -1);
max = math::Vector3d(1, 1, 1);
Expand Down
3 changes: 2 additions & 1 deletion ogre2/src/Ogre2MeshFactory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,8 @@ bool Ogre2MeshFactory::LoadImpl(const MeshDescriptor &_desc)
math::Vector3d max = _desc.mesh->Max();
math::Vector3d min = _desc.mesh->Min();

if (_desc.mesh->HasSkeleton())
if (_desc.mesh->HasSkeleton() &&
_desc.mesh->MeshSkeleton()->AnimationCount() != 0)
{
min = math::Vector3d(-1, -1, -1);
max = math::Vector3d(1, 1, 1);
Expand Down

0 comments on commit cc8a9ff

Please sign in to comment.