2D Toolkit Forum

2D Toolkit => Support => Topic started by: andreasgan on January 27, 2015, 09:37:16 am

Title: TileMapColliderBuilder2D creates an extra edgecollider point/vertex
Post by: andreasgan on January 27, 2015, 09:37:16 am
I've converted the TileMapColliderBuilder2D to build polygoncollider2ds instead of edgecollider2ds, but now each collider now has an extra point. I understand that this was required for edge (to create the last "wall" and close the collider), but now that I have poly, they automatically create the last wall.

Does anyone know how I can fix this right off the bat?

I don't understand all of the TileMapColliderBuilder2D code, especially not the part with making "verts" and "indices," so any hints as to where to look / what to google so that I can figure it out myself works too.

I attached some example screenshots below.
Title: Re: TileMapColliderBuilder2D creates an extra edgecollider point/vertex
Post by: unikronsoftware on January 27, 2015, 11:15:50 am
When assigning points to your collider, simply remove the last one. The algorithm works on edges, changing that won't be straightforward.
Title: Re: TileMapColliderBuilder2D creates an extra edgecollider point/vertex
Post by: andreasgan on January 27, 2015, 11:35:27 am
Haha thanks! That's so ridiculously obvious, I dont know why i didnt think of that myself!
Thank you :)