Hello Guest

Author Topic: Sprite going through tilemap colliders  (Read 1746 times)

jmenossi

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 18
    • View Profile
Sprite going through tilemap colliders
« on: August 18, 2014, 11:24:48 am »
Hi, I'm having a problem with my 2D character (sprite): In some cases, it goes through Tilemap colliders.

I have attached a sample project, and I am using Unity 4.5.2 with tk2d 2.4.0

In the scene ('TestRoom') you have several points (marked with red arrows) where the character goes into tilemap colliders.
It doesn't happen everywhere, only at specific tile heights AND when colliding from left side.
I copied the same tile structure into different places, and the character can't break into all of them (only at red arrows, not the green ones).

I sent email to support, but wanted to post on the forum too, just in case other users have run into the same issue.

Any idea about this? Is it a bug with tilemap colliders? How could I fix this?

Thanks!


unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Sprite going through tilemap colliders
« Reply #1 on: August 18, 2014, 07:04:21 pm »
That looks like its because Unity doesn't seem to like edge colliders that are overlapping. In this specific case, make the box colliders fill the tile as opposed to having different sizes on each tile. That fixes this specific issue. Its obvious when you zoom in a lot more and press shift to show the borders - there is overlap going into each tile.