Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Bug Tilemap Collider 2D problem

Discussion in '2D' started by TuxoAhjhj, Aug 12, 2023.

  1. TuxoAhjhj

    TuxoAhjhj

    Joined:
    Jan 12, 2023
    Posts:
    8
    I'm currently facing a problem regarding using tilemap collider with my tilemap
    Orignally due to my mistake, my tile was at a size 10 times it's intended size (320x320 instead of 32x32)
    So I resized my tile back to 32x32, and changed the pixel per unit accordingly. I also re-sliced my tilemap sprite with method set to Smart, hoping it won't affect the grid I already made.
    Unfortunately:
    upload_2023-8-13_2-2-51.png

    This happened.
    All tiles in the screenshot belongs to the same sprite sliced using unity. Some how only the tile in the middle has it's collider expanded to 10 times it's size, and I can't figure out why or how to deal with it.

    The only other clue I have is any time I change anything in the sprite and apply it, Unity raise a warning: rect lies (partially) outside of texture. Will not generate Sprite for this slice.

    The colliders are created with customs physic shape in sprite editor.

    Please help me if anyone have any idea, thank you all very much.
     
  2. TuxoAhjhj

    TuxoAhjhj

    Joined:
    Jan 12, 2023
    Posts:
    8
    I’m not sure if im correct, but it seems that after I resized the image, it left behind the custom physic shape of one of the tile (which is now 10 times the size of the resized tile), and this lead to the problem in the screenshot. I’ve since been able to reset it