Unity Issue Tracker - Cinemachine Confiner 2D InvalidateBoundingShapeCache() fails when scaling Bounding Shape at runtime
Closed
CMCL-1707
Cinemachine Confiner 2D InvalidateBoundingShapeCache() fails when scaling Bounding Shape at runtime
Package: Cinemachine (Old)
As Designed
3.1.X
User error: the polygon's localScale.z was being set to 0 by user code. It should remain at 1.
In ScaleBorderMask.cs line 30, code reads transform.localScale = new Vector2(x, y);
when it should read transform.localScale = new Vector3(x, y, 1);
Reproduction steps:
1. Open the attached “IN-109223.zip” project
2. Open the “SampleScene”
3. Enter Play mode
4. Move with “A” or “D” keys to red or green point
5. Observe the CM Camera Confiner after scaling
Expected result: The Confiner adjusts accordingly
Actual result: The Confiner breaks