Search Unity

2D Tilemap colliders on collectibles

Discussion in '2D' started by Judgeking, Apr 9, 2021.

  1. Judgeking

    Judgeking

    Joined:
    Apr 15, 2017
    Posts:
    17
    I'm using Tilemaps to create a Pac Man type game, and am using a tilemap to place the "dots". I need to capture the OnEnter event of a dot to "eat" it so I added a Tilemap collider.

    Thru testing, I've found it does register the hit, but won't register another hit while it's still in the collider of a previous dot. So only if I REALLY space out my dots does a Tilemap work for this.

    In the below pics, the first would register 4 hits. In the second, only 2: 1 when it hits the first dot, then not again until the last, spaced out one.

    upload_2021-4-9_3-8-12.png

    upload_2021-4-9_3-10-47.png

    Any help would be appreciated, thanks!