SL-20752 Mouselook no longer allows pitch upwards to full 90 degrees

meow-7.2.2
Alexander Gavriliuk 2024-01-10 06:40:58 +01:00 committed by Guru
parent b489142cb1
commit 44f509a319
1 changed files with 2 additions and 1 deletions

View File

@ -1473,8 +1473,9 @@ void LLAgent::pitch(F32 angle)
// after left-clicking the mouse on the avatar and dragging down
//
// The issue is observed on angle below 10 degrees
bool isMouseLookOn = mControlFlags & AGENT_CONTROL_MOUSELOOK;
const F32 look_down_limit = 179.f * DEG_TO_RAD;
const F32 look_up_limit = 10.f * DEG_TO_RAD;
const F32 look_up_limit = (isMouseLookOn ? 1.f : 10.f) * DEG_TO_RAD;
F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);