Search Unity

Gap between 2D rigidbodies

Discussion in '2D' started by Gesh, Dec 2, 2013.

  1. Gesh

    Gesh

    Joined:
    Feb 23, 2013
    Posts:
    6
    Hello, I have noticed a gap between 2D rigidbodies using the 2D Box Collider.

    Here's a screenshot http://i.imgur.com/6rKUTRx.png .. both sprites are 100x100.

    Any help would be greatly appreciated!
     
  2. unitylover

    unitylover

    Joined:
    Jul 6, 2013
    Posts:
    346
    Can you show me a screenshot without it zoomed in so I can duplicate how you have your scene setup? Thanks!
     
  3. unitylover

    unitylover

    Joined:
    Jul 6, 2013
    Posts:
    346
    I noticed the same gap when using two rigidbody 2d objects. One solution would be to adjust your box collider Y value to compensate for this gap. Making it smaller would ensure your two sprites could touch each other pixel to pixel. It is also worth mentioning that the gap you are speaking of is so small that it measures 0.01 in thickness so unless your game does some crazy zooming during gameplay you should be just fine.
     
  4. Gesh

    Gesh

    Joined:
    Feb 23, 2013
    Posts:
    6
    http://i.imgur.com/AT9hbHg.png the red sprites are 100x100, when they fall there is a clear gap between them.

    The grey box is the floor.

    Edit: Just seen your other reply! ok thanks!