Cinemachine 2.7.2 confiner extension 2d mode doesn't respect concave confiner.

Unity Version: 2021.1.0b1.1725
Windows 10
Cinemachine: 2.7.2

Like in image. Camera sink into bounding if the concave edge of bounding shape (yellow) is smaller than camera viewport (white) width. Whereas confiner 2D extension works well with same bounding.

6892628--806144--bug.png

1 Like

Thanks for the report. I believe the devs are unavailable today, but I’ll ask them to investigate later in the week.

CinemachineConfiner 2D mode is inferior to CinemachineConfiner2D. The problem you encountered is among the reasons why CinemachineConfiner2D component was created. :slight_smile:

CinemachineConfiner 2D mode is a simple solution that works in simple cases (e.g. rectangle collider), but does not handle more complex cases well in general, such as concave shapes, undersized (when the camera window does not fit inside the confining area), 2D perspective camera, etc.

In your case, I would suggest using the new CinemachineConfiner2D component. :wink:

Thanks for all your replies.

@marc_tanenbaum But today is vague on this earth. :wink:

@gaborkb I’m confused when I found there are 2 extensions with same functionality but the manual does not mention their difference. I guess you are already planning on merging or removing one of them. I’m using Cinemachine Confiner 2D so there is no problem now.

2 Likes