CMCL-1665: confiner 2D dynamic float-to-int scaling#1053
Merged
Conversation
|
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #1053 +/- ##
=======================================
Coverage ? 27.33%
=======================================
Files ? 256
Lines ? 28686
Branches ? 0
=======================================
Hits ? 7841
Misses ? 20845
Partials ? 0
🚀 New features to boost your workflow:
|
alexzaranek
approved these changes
Apr 4, 2025
Contributor
alexzaranek
left a comment
There was a problem hiding this comment.
Validated that the Confiner now handles larger bounding boxes correctly. Changes looks good.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this PR
CMCL-1665: CinemachineConfiner2D stops working when bounding shape is very large
Conversion between float world coords and the fixed point that Clipper expects was suffering when bounding shapes approaceh 1000 units in size. This is because the hardcoded scaling factor was tuned for small bounding shapes and was too precise for large shapes.
The fix was to dynamically adapt the scaling factor, keeping it the same for small shapes, but decreasing it gradually as the shapes got bigger.
Testing status
Documentation status
Technical risk
low