summaryrefslogtreecommitdiff
path: root/indra/newview/llagentcamera.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2025-10-17 16:56:48 -0400
committerGitHub <noreply@github.com>2025-10-17 16:56:48 -0400
commitaec7bf19ebffd9d6b60c68e31de723eabd6aa98a (patch)
tree9ee0b36fa08a99444260baaf5ea9b019758bb125 /indra/newview/llagentcamera.cpp
parente81b1de01e2b28f83cd2c85691428211bb9105e9 (diff)
parent57a9e51360aebf142bbbdc2663f68ebacfb7d8f5 (diff)
Merge pull request #4714 from secondlife/release/2025.07
Release/2025.07
Diffstat (limited to 'indra/newview/llagentcamera.cpp')
-rw-r--r--indra/newview/llagentcamera.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 339656089c..b2c66b1bac 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1752,7 +1752,6 @@ F32 LLAgentCamera::calcCameraFOVZoomFactor()
LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit)
{
// Compute base camera position and look-at points.
- F32 camera_land_height;
LLVector3d frame_center_global = !isAgentAvatarValid() ?
gAgent.getPositionGlobal() :
gAgent.getPosGlobalFromAgent(getAvatarRootPosition());
@@ -1989,10 +1988,11 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit)
}
}
- // Don't let camera go underground
- F32 camera_min_off_ground = getCameraMinOffGround();
- camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global);
- F32 minZ = llmax(F_ALMOST_ZERO, camera_land_height + camera_min_off_ground);
+ // Don't let camera go underground if constrained
+ // If not constrained, permit going 1000m below 0, use case: retrieving objects
+ F32 camera_min_off_ground = getCameraMinOffGround(); // checks isDisableCameraConstraints
+ F32 camera_land_height = LLWorld::getInstance()->resolveLandHeightGlobal(camera_position_global);
+ F32 minZ = camera_land_height + camera_min_off_ground;
if (camera_position_global.mdV[VZ] < minZ)
{
camera_position_global.mdV[VZ] = minZ;