Skip to content

Commit 0cb1aa8

Browse files
authored
Bugfix: FramingTransposer with a dead zone would sometimes drift (#1031)
1 parent d28cada commit 0cb1aa8

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

com.unity.cinemachine/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
99
### Bugfixes
1010
- CameraDeactivated events were not sent consistently when a blend interrupted another blend before completion.
1111
- CameraActivated events were not sent consistently when activation was due to timeline blends.
12+
- Bugfix: FramingTransposer with a dead zone would sometimes drift.
1213

1314
### Changed
1415
- Added delayed processing to near and far clip plane inspector fields for the CinemachineCamera lens.

com.unity.cinemachine/Runtime/Components/CinemachinePositionComposer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public override void MutateCameraState(ref CameraState curState, float deltaTime
319319
realTargetPos - cameraOffset, hardGuideOrtho);
320320
}
321321
}
322-
curState.RawPosition = localToWorld * (cameraPos + cameraOffset);
322+
curState.RawPosition = camPosWorld + localToWorld * cameraOffset;
323323
m_PreviousCameraPosition = curState.RawPosition;
324324

325325
m_InheritingPosition = false;

com.unity.cinemachine/Runtime/Deprecated/CinemachineFramingTransposer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ public override void MutateCameraState(ref CameraState curState, float deltaTime
549549
realTargetPos - cameraOffset, hardGuideOrtho);
550550
}
551551
}
552-
curState.RawPosition = localToWorld * (cameraPos + cameraOffset);
552+
curState.RawPosition = camPosWorld + localToWorld * cameraOffset;
553553
m_PreviousCameraPosition = curState.RawPosition;
554554

555555
// Adjust lens for group framing

0 commit comments

Comments
 (0)