Search Unity

2D Tilemap Collider doesnt seem to work.

Discussion in '2D' started by chwistekmarek, Dec 2, 2019.

  1. chwistekmarek

    chwistekmarek

    Joined:
    Nov 7, 2017
    Posts:
    1
    Knight.png Wallmap.png
    Trying to make a collidable tilemap 2d. It has a tilemap collider on it and the player has a Rigidbody aswell as a box collider 2d on him. The player just phases through walls, like they aren't there.
     
  2. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    2,056
    Kinematic bodies don't react to forces therefore don't produce a collision response. They also don't collide (by default) to produce contact information anyway (your TilemapColldier2D is static).

    Set your player to Dynamic body-type. If not, you'll need to use queries to detect collisions from it.