From 64a59928d0c03389bfce4cc95f5c4a565111dcb6 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Thu, 25 May 2023 10:39:01 -0500 Subject: SL-19405 Better fix for rotation gyzmo having a huge dead zone. --- indra/newview/llmaniprotate.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'indra') 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); } } -- cgit v1.2.3