Skill Tree Activated

The quest to become an indie game developer

#100DaysOfGameDevGame DevIllogical BaconPanic RoomTrainingUnity

Creating 2D Isometric Tilemaps in Unity (part 2)

Day 007 #PanicRoom
Day 071 #100DaysOfGameDev

(continued from Part 1)

Collisions

With all the Tiles for the Tilemap properly placed to form a basic level, it is time to get down to testing movement and making sure Walls actually act like Walls and stop Player movement. This is done via Collision.

moving around WITHOUT collisions
Collision Palette
altering the Color and Alpha of Collision Tiles
  • Create a new Palette and add Tiles that either match existing ones or will block off the areas of other Tiles that the Player shouldn’t be able to pass

  • A good technique is to alter the color and transparency of your Collision Tiles to make them stand out when designing the level to make them appear as more of an overlay
painted Collision layer
  • Add a Tilemap Collider 2D component to the Tilemap to create Colliders for each Tile based on their shapes
adding Tilemap Collider 2D
  • Add a Composite Collider 2D component to unify all the separate Collider shapes into one big shape to aid with performance. Be sure to check the box in Tilemap Collider 2D for Used By Composite.
  • Test to make sure it all works
testing the Collision Tilemap

Leave a Reply

Your email address will not be published. Required fields are marked *