summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHadet <hadet@Mac.lan>2026-05-30 16:51:33 -0500
committerHadet <hadet@Mac.lan>2026-05-30 16:51:33 -0500
commit390597c3bd532b29b4dfb4fb63cae9ac71bdbed9 (patch)
treecb0ca16c8a6e19701723048608f3c5ca9f671585
parente600e5936e0804baa1762134fa2ac428339131de (diff)
Smooth OTS entry transition and instant exit matching mouselook
-rw-r--r--indra/newview/llagentcamera.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index 80dfeac2d2..6f9f8bfa2a 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -2297,6 +2297,14 @@ void LLAgentCamera::changeCameraToOTS()
{
gAgentAvatarp->updateAttachmentVisibility(CAMERA_MODE_THIRD_PERSON);
}
+
+ // Start the camera animation LAST, after mCameraMode is OTS and after
+ // changeCameraToMouselook(false) has cleared mCameraAnimating via its
+ // animate=false branch. The rendered camera is still at the old
+ // (third-person) position this frame, so startCameraAnimation snapshots
+ // that as the start point and updateCamera lerps to the OTS shoulder
+ // target over ZoomTime seconds — matching the mouselook transition feel.
+ startCameraAnimation();
}
}
@@ -2406,7 +2414,7 @@ void LLAgentCamera::changeCameraToThirdPerson(bool animate)
}
mCameraLag.clearVec();
- if (mCameraMode == CAMERA_MODE_MOUSELOOK)
+ if (mCameraMode == CAMERA_MODE_MOUSELOOK || mCameraMode == CAMERA_MODE_OTS)
{
mCurrentCameraDistance = MIN_CAMERA_DISTANCE;
mTargetCameraDistance = MIN_CAMERA_DISTANCE;