Using tilemap collider for cinemachine confiner

Hi

I’m trying to make a tilemap for the border of my game and I want to use that as the confiner for the cinemachine camera.
The confiner can take polygon collider or tilemap collider but I can’t seem to make it work with the tilemap collider.

What I want is to confie the camera to be inside the tiles I defined.
Any idea how to make this work?

thank you

Hi Kremzon,

Welcome to our community! :slight_smile:

Regarding your question, maybe this thread could be interesting for you.

Use the Confiner2D and test your tilemap. If it does not work, try what was suggestd in the linked thread as the tilemap collider might not be compatible with the cinemachine asset.

Hopefully, this helped.

Please feel free to also ask our helpful community of students for further advice over on our Discord chat server.


See also:

Thanks for your response but I actually managed to figure it out.
I think my issue was the layers colliding.
I changed my boundary layer to not interact with anything.
After that I had to make sure I first created the composite collider before the tilemap collider and then everything works as expected

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms