summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-05-25 10:39:01 -0500
committerRunitaiLinden <davep@lindenlab.com>2023-05-25 10:39:01 -0500
commit64a59928d0c03389bfce4cc95f5c4a565111dcb6 (patch)
tree964aefd957a3fc2324ee8ae3d2ef95b17401449b /indra
parent963ca3a0d5c40f4af2fa681f8ff6d4a97bb7b47c (diff)
SL-19405 Better fix for rotation gyzmo having a huge dead zone.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llmaniprotate.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 886abfb132..7f37f98568 100644
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -1714,6 +1714,7 @@ LLVector3 LLManipRotate::intersectRayWithSphere( const LLVector3& ray_pt, const
}
// Utility function. Should probably be moved to another class.
+// x,y - mouse position in scaled window coordinates (NOT GL viewport coordinates)
//static
void LLManipRotate::mouseToRay( S32 x, S32 y, LLVector3* ray_pt, LLVector3* ray_dir )
{
@@ -1727,10 +1728,8 @@ void LLManipRotate::mouseToRay( S32 x, S32 y, LLVector3* ray_pt, LLVector3* ray_
}
else
{
- *ray_pt = gAgentCamera.getCameraPositionAgent();
- LLViewerCamera::getInstance()->projectScreenToPosAgent(x, y, ray_dir);
- *ray_dir -= *ray_pt;
- ray_dir->normVec();
+ *ray_pt = gAgentCamera.getCameraPositionAgent();
+ *ray_dir = gViewerWindow->mouseDirectionGlobal(x, y);
}
}