Skip to content

Commit

Permalink
Tweak max camera position limit (#827)
Browse files Browse the repository at this point in the history
Tweak the max camera position value that's set in #824.

Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Mar 3, 2023
1 parent 84a6085 commit 140e345
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions ogre2/src/Ogre2Node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@ void Ogre2Node::SetRawLocalPosition(const math::Vector3d &_position)
// Ogre::AxisAlignedBox::setExtents assertion error when the camera scene node
// position has large values. Added a workaround that places a max limit on
// the length of the position vector.
if (dynamic_cast<Ogre2Camera *>(this) && _position.Length() > 1e10)
if (dynamic_cast<Ogre2Camera *>(this) && _position.Length() > 1e9)
{
ignerr << "Unable to set camera node position to a distance larger than "
<< "1e10 from origin" << std::endl;
<< "1e9 from origin" << std::endl;
return;
}
this->ogreNode->setPosition(Ogre2Conversions::Convert(_position));
Expand Down Expand Up @@ -280,5 +280,3 @@ void Ogre2Node::SetLocalScaleImpl(const math::Vector3d &_scale)

this->ogreNode->setScale(Ogre2Conversions::Convert(_scale));
}


0 comments on commit 140e345

Please sign in to comment.