[Cinemachine 2D Confiner] Confiner ignores PolygonCollider2D "Auto Tiling"

Hello,
I am having a problem with using the PolygonCollider2D component as the Cinemachine2D camera confiner in Unity 2019.1.8f in my 2D project.

When I set the PolygonCollider2D to “Auto Tiling” so that it will scale with the size of the tiled sprite it is a component of, assigning it as the confiner for a 2D cinemachine virtual camera ignores the “Auto Tiling” function and instead only recognizes the shape the collider would be if “Auto Tiling” were not checked.
I am using Cinemachine version 2.3.4.

Any help would be appreciated. Being able to set auto-tiling PolygonCollider2D’s as cinemachine confiners would save me a lot of time and headache.

I have attached two images; the auto-tiled collider when the object it’s apart of is focused, and that same collider as it appears to the camera it is a confiner of.

Thank you very much for your time.

Check out this thread, maybe it will help: Cinemachine Confiner for 2D - to block at the borders of the map

Hi Gregoryl,

I’m not quite sure how this helps. I am not using tilemaps at all in my project. Instead I am using Unity’s sprite 9-slicing functionality.
All I am looking for is for Cinemachine to be aware I have “auto-tiling” selected on my collider so that it knows the collider should be the same size as the 9-sliced sprite.
If there is a programmatic workaround for this, I am not sure how to go about it myself.

Thank you for your time.

Hi,

Using 2d colliders with auto-tiling and Cinemachine confiner won’t work right now because the collider shape is generated while the confiner is retrieving the original collider shape.

The only work around I can think of right now will be to manual edit your collider shape so that it matches the the area you want to confine to.

We will look into how we can support this properly with Cinemachine.

Thank you for your incredibly informative reply.
I understand what I was attempting to do was something of an unusual and perhaps unoptimal case, but I couldn’t understand why it wouldn’t just work.
Thank you for your time.