summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-02 19:55:34 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-06 23:24:38 +0300
commit8215fff0c2a1c895ef916837847cf7526ae61ef9 (patch)
tree7c3346132eab0481532e7e2fd6896df86f936c92 /indra/newview/llagentcamera.cpp
parent77147012fff0673fc5c8ab9ffe654bd32305ad1a (diff)
SL-14717 Ability to trigger left clicks (and more) on animesh objects
Contribution by Rohacan Hirons SL-14717 Follow ups SL-14717 Using the cached setting in LLToolPie::handleHover()
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 ed6c3c307f..e10244aad6 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2501,8 +2501,16 @@ void LLAgentCamera::setFocusGlobal(const LLPickInfo& pick)
{
// focus on object plus designated offset
// which may or may not be same as pick.mPosGlobal
+ // except for rigged items to prevent wrong focus position
+ if (objectp->isRiggedMesh())
+ {
+ setFocusGlobal(pick.mPosGlobal, pick.mObjectID);
+ }
+ else
+ {
setFocusGlobal(objectp->getPositionGlobal() + LLVector3d(pick.mObjectOffset), pick.mObjectID);
}
+ }
else
{
// focus directly on point where user clicked