Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Tilemap collision too high and blocks player

Discussion in '2D' started by Davrozz, May 15, 2022.

  1. Davrozz

    Davrozz

    Joined:
    May 15, 2022
    Posts:
    8
    Hi,
    I am testing out making a game and am (literally) stuck at one part: tilemap collision.
    It works fine for flat parts, but when the player encounters a slope upwards, he gets stuck because the box colliders collide with the slope, seeing as it is higher than the ground. a picture to help envision it:
    upload_2022-5-15_22-48-45.png
    As you can see the tilemap collider (the small green line) is higher than the rest, and the player walks against it. Any ideas as to how I can fix this?
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,321
    Did you edit the actual physics outline for that tile sprite in the sprite editor? This is just whatever that defaults to so you're best to edit it to be exactly what you want.
     
    Davrozz and karliss_coldwild like this.
  3. Davrozz

    Davrozz

    Joined:
    May 15, 2022
    Posts:
    8
    Thanks! I did not see the option to change it's physical outline in the sprite editor at first. This solved it!
     
    MelvMay likes this.