Hi, I want to use camera confiner on the inclines, but a corner of the camera is out of bounds of it. I tried modifying every setting in camera’s body but nothing changed.
I’m posting a screen where collider is green line. As you can see, at bottom it works correctly, but the incline on the right is partially in the camera (white rectangle).
Is there any way to get rid of this margin besides setting collider’s points differently?
Could you show an image of your scene view while the Virtual Camera (with the Confiner2D) is selected in the Hierarchy and an image of the Inspector window showing the Confiner please?
Your confiner cannot fit the camera inside the polygon. On your scene with camera and confiner.png image, the white rectangle is the camera view window and the yellow is the confining polygon. There is clearly no way of fitting the white rectangle in the yellow perfectly.
In some case, you could enable the Oversize Window option on Confiner2D to solve such issues.
In this case, however, I think you’ll get better results if you increase the height of the confining polygon (i.e. move the top points up a bit). I think you need to increase the height by about 2-2.5 to get the desired outcome.
Thank you for hour help, I managed to found the issue. There was not enough space both horizontally and vertically on bottom, so after tweaking points a bit here and there the problem has been solved.