Allow camera to go (almost) all the way up (179 degrees, cant do 180 or the camera wll freek out) and (almost) all the way down (down to 1 degree, cant look straight down for same reason), implements FIRE-2065
parent
f394597119
commit
3f5b8ee9da
|
|
@ -1062,18 +1062,11 @@ F32 LLAgent::clampPitchToLimits(F32 angle)
|
|||
LLVector3 skyward = getReferenceUpVector();
|
||||
|
||||
F32 look_down_limit;
|
||||
F32 look_up_limit = 10.f * DEG_TO_RAD;
|
||||
F32 look_up_limit = 1.f * DEG_TO_RAD;
|
||||
|
||||
F32 angle_from_skyward = acos( mFrameAgent.getAtAxis() * skyward );
|
||||
|
||||
if (isAgentAvatarValid() && gAgentAvatarp->isSitting())
|
||||
{
|
||||
look_down_limit = 130.f * DEG_TO_RAD;
|
||||
}
|
||||
else
|
||||
{
|
||||
look_down_limit = 170.f * DEG_TO_RAD;
|
||||
}
|
||||
look_down_limit = 179.f * DEG_TO_RAD;
|
||||
|
||||
// clamp pitch to limits
|
||||
if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit))
|
||||
|
|
|
|||
Loading…
Reference in New Issue