summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-16 02:00:51 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-05-16 02:00:51 +0300
commit60d8647a32db1dd54ffde742e157b54b183592a7 (patch)
tree5b1820a053dfeb77bbe4281bd87173db95eefce1 /indra/newview/llagentcamera.cpp
parent74687f270545ededb77f29a7409f64303dcb2e2d (diff)
SL-19602 Alt-Zoom overcompensates for z pelvis fixup
Alt zoom was pointing near ground instead of agent's actual position
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();