Search Unity

2D collision glitch crossing multiple objects - *Project Included*

Discussion in '2D' started by Invertex, Jan 13, 2014.

  1. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,550
    This is an issue that's hampering our ability to create a good and fast workflow based on prefab tiles. Even though each tile's collider absolutely meets the other perfectly, Unity will still sometimes get caught on their edges when sliding from one collider to the next. This doesn't make any sense, especially considering it is random. (also, using a Circle collider isn't an option for the style we're going for. Or at least, it would immensely complicate things.)

    Changing the Physics2D global settings doesn't affect it either. Tried pumping the Velocity and and Position Iterations up into the hundreds, no change to this issue. Hell, even if the colliders are interpenetrating eachother, it still happens.

    I've attached a project with a tiny little game I whipped up to illustrate the issue better.

    Play online:
    http://dl.dropboxusercontent.com/u/14765241/GlitchGuy/GlitchGuy.html
     

    Attached Files:

    Last edited: Jan 13, 2014
  2. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,550
  3. TaewYn

    TaewYn

    Joined:
    Jan 30, 2013
    Posts:
    19
    Thanks for sharing what you found! The edge colliders fixed it for me as well.