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.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 1b006a2311..e0ade4d395 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1539,6 +1539,14 @@ LLVector3d LLAgentCamera::calcFocusPositionTargetGlobal()
}
else if (mCameraMode == CAMERA_MODE_CUSTOMIZE_AVATAR)
{
+ if (mFocusOnAvatar)
+ {
+ LLVector3 focus_target = isAgentAvatarValid()
+ ? gAgentAvatarp->mHeadp->getWorldPosition()
+ : gAgent.getPositionAgent();
+ LLVector3d focus_target_global = gAgent.getPosGlobalFromAgent(focus_target);
+ mFocusTargetGlobal = focus_target_global;
+ }
return mFocusTargetGlobal;
}
else if (!mFocusOnAvatar)