mirror of
https://github.com/FirestormViewer/phoenix-firestorm.git
synced 2026-08-14 00:48:30 +00:00
Fix camera from becoming stuck if you rapidly zoom out with DisableCameraConstraints enabled
Signed-off-by: Hecklezz <tj8@live.com.au>
This commit is contained in:
committed by
Andrey Kleshchev
parent
afa7b968ce
commit
787d00d532
@@ -975,6 +975,10 @@ void LLAgentCamera::cameraZoomIn(const F32 fraction)
|
||||
new_distance = llclamp(new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new_distance = llmin(new_distance, getCameraMaxZoomDistance());
|
||||
}
|
||||
|
||||
mCameraFocusOffsetTarget = new_distance * camera_offset_unit;
|
||||
}
|
||||
@@ -1035,6 +1039,10 @@ void LLAgentCamera::cameraOrbitIn(const F32 meters)
|
||||
new_distance = llclamp(new_distance, APPEARANCE_MIN_ZOOM, APPEARANCE_MAX_ZOOM);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
new_distance = llmin(new_distance, getCameraMaxZoomDistance());
|
||||
}
|
||||
|
||||
// Compute new camera offset
|
||||
mCameraFocusOffsetTarget = new_distance * camera_offset_unit;
|
||||
|
||||
Reference in New Issue
Block a user