Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMCL-1629: pantilt recentering was ignoring axis center setting #1029

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions com.unity.cinemachine/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
## [3.1.3] - 2025-12-31

### Bugfixes
- Regression fix: CinemachinePanTilt recentering was ignoring axis Center setting.
- CameraDeactivated events were not sent consistently when a blend interrupted another blend before completion.
- CameraActivated events were not sent consistently when activation was due to timeline blends.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ public Vector2 GetRecenterTarget()
var v = Quaternion.FromToRotation(Vector3.forward, fwd).eulerAngles;
return new Vector2(NormalizeAngle(v.y), NormalizeAngle(v.x));
}
return Vector2.zero;
return new Vector2(PanAxis.Center, TiltAxis.Center);

static float NormalizeAngle(float angle) => ((angle + 180) % 360) - 180;
}
Expand Down
Loading