Fix for sh-1119: Alt Zooming on assets that contain a pivot point can at times cause erratic camera movement

meow-7.2.2
prep 2011-03-10 12:09:29 -05:00
parent 94b0ce6d84
commit 79664c1017
1 changed files with 4 additions and 2 deletions

View File

@ -393,10 +393,12 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
{
return original_focus_point - obj_pos;
}
LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation
LLVector3 object_extents = object->getScale();
LLVector3 object_extents;
const LLVector4a* oe4 = object->mDrawable->getSpatialExtents();
object_extents.set( oe4[1][0], oe4[1][1], oe4[1][2] );
// make sure they object extents are non-zero
object_extents.clamp(0.001f, F32_MAX);