Issue with collision of TileMap

Godot Version



I have set up a “World” level, in which I’ve defined a TileMap. That TileMap has a TileSet, in which I set up collision(I think. Red shaded areas in Physics Layer 0)

In the same “World” level I have put a Player(which is an Area2D).

My TileMap Collision is Layer 1, Mask 2. My Player Collision is Layer 2, Mask 1.

It is a top down 2D game, and my player can move through the parts shaded red in the TileSet editor, which I did not expect.

Any help appreciated!

Area2D does not have collision, it only detects when bodies / other areas enter or exit it. You probably want a CharacterBody2D.

Thank you for the response!
I’ve changed the node type to be a CharacterBody2D.
Sadly it does not work yet. Is there a way to further debug this?
Does this work out of the box with just the settings in the UI, or does this need scripting?

Adding some screenshots for reference.

PS: kind of weird that an Area2D has no collision, but does have collision settings :confused:

PPS: would add screenshots, but I can only embed 1 :frowning:

Collision shapes are blue, not red. I think you didn’t add collision shapes correctly.

The issue was with how I was moving my player…

Found out about move_and_slide