Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

BoxCollider2D can glitch through TilemapCollider2D floors at high speeds

Discussion in '2D Experimental Preview' started by Wisteso, Feb 28, 2020.

  1. Wisteso

    Wisteso

    Joined:
    Nov 17, 2013
    Posts:
    50
    Version is 2019.2.6f1

    I have a floor which is made up of 16x16 tiles, each tile counting as a 1x1 block. I also have a BoxCollider2D representing the test "hero" who can move side to side and jump very high.

    It seems there is a bug with Unity that causes a BoxCollider2D to just smash through a TilemapCollider2D at high enough speeds. It doesn't happen every time but it's pretty frequently. Never happens at lower velocities.

    Gravity is the standard value but velocity is high due to the object falling for a good 8 seconds or so.

    I can reproduce the issue 100% of the time, using a slightly tweaked version of my project.

    glitchthrough.png
     
    Last edited: Feb 28, 2020
  2. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,514
    Last edited: Feb 29, 2020
  3. Wisteso

    Wisteso

    Joined:
    Nov 17, 2013
    Posts:
    50
    Changing to continuous did the trick. Thank you
     
  4. Lo-renzo

    Lo-renzo

    Joined:
    Apr 8, 2018
    Posts:
    1,514
    Glad to hear!
     
  5. InfiniteDesign8

    InfiniteDesign8

    Joined:
    Aug 22, 2017
    Posts:
    38
    lol bug...thats unity