summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r--indra/newview/llagentcamera.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 77131efd75..2cf86cb001 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -401,10 +401,15 @@ LLVector3 LLAgentCamera::calcFocusOffset(LLViewerObject *object, LLVector3 origi
// if is avatar - don't do any funk heuristics to position the focal point
// see DEV-30589
- if (object->isAvatar() || (object->isAnimatedObject() && object->getControlAvatar()))
+ if ((object->isAvatar() && !object->isRoot()) || (object->isAnimatedObject() && object->getControlAvatar()))
{
return original_focus_point - obj_pos;
}
+ if (object->isAvatar())
+ {
+ LLVOAvatar* av = object->asAvatar();
+ return original_focus_point - av->getCharacterPosition();
+ }
LLQuaternion inv_obj_rot = ~obj_rot; // get inverse of rotation
LLVector3 object_extents = object->getScale();