I’m new to using Tiled and am having a problem with the collision system when rotating a tile. I have a corner tile which I added a polyline to 2 edges to create the edge collider in Unity. On one of the rotations the poly line is not correct. Below is an image of the issue.
The first three tiles have the edge collider assigned correctly. The last one is intersecting through the tile instead of going along the edge. Is there something I’m doing wrong or some setting I need to use to make sure all rotations work correctly? Or perhaps is this an issue with Tiled2Unity which I’m using to export?
Hi there. Can you email me your example? A small TMX file and the texture it references should be enough to help me debug. You can find my email on my website: www.seanba.com
I’ve emailed an example tmx file that reproduces the issue along with the spritesheet.
It looks like it’s a bug with the (otherwise rock-solid) Clipper library when you have open paths (i.e. polylines) with just two edges. I’m going to debug some more but I may need to call in to the author of Clipper for backup. In the meantime, if you can work with polylines with 1 edge or more than 2 edges then you should be okay.
Thanks for the quick response. I’ll just close the paths with a third line since that sounds like the easiest solution.
Good news. The Clipper author made a fix for this I was able to roll into the Tiled2Unity. If you download version 220.127.116.11 this should be fixed. Thanks for the bug report.