Conversation
Core issue was a bugfix for the portals scene (fd5aafd) to account for camera rotation when warping both a target and camera. The bugfix erroneously changed the OnForceCameraPosition function to rely on the target position (current transform) instead of the camera position. This meant that forcing the camera to look away from the target did not work. This fix corrects the original bugfix by reverting PreviousTargetPosition calculation method, but keeps the m_PreviousOffset calculation method from the bugfix, as this one is needed to account for rotations.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
PR Code Suggestions ✨Explore these optional code suggestions:
🤖 Helpful? Please react with 👍/👎 | Questions❓Please reach out in Slack #ask-u-pr |
|||||||||
Codecov ReportAll modified and coverable lines are covered by tests ✅ @@ Coverage Diff @@
## main #1099 +/- ##
=======================================
Coverage ? 17.36%
=======================================
Files ? 209
Lines ? 23697
Branches ? 0
=======================================
Hits ? 4115
Misses ? 19582
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Purpose of this PR
For for https://jira.unity3d.com/browse/UUM-131870 (https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-131870)
Issue was OnForceCameraPosition that was updated in fd5aafd to fix a bug in the portals scene (proper camera rotation when forcing camera position/rotation). The fix changed how the target position was computed, preventing OnForceCameraPosition from looking away from the target.
Now OnForceCameraPosition has proper rotation support (though m_PreviousOffset) but recomputes the new PreviousTargetPosition without going though the actual target position, allowing to force the camera to look away from the target.
Testing status
Documentation status
Technical risk
low risk low halo
Comments to reviewers
Broken in fd5aafd
Package version