Area2d and tileset collision

Godot Version

4.1.3

Question

I am trying to detect collision with a tilemap. It wont work currently. I am pretty new to godot. ![image|404x172](upload://90odHmq768uaHCP7PG7NPIEB9rF.png)

Hi, we can’t actually see the image currently because of the formatting, could you edit your post removing the backticks from the start and end of the question:
`I am trying to detect collision with a tilemap. It wont work currently. I am pretty new to godot. ![image|404x172](upload://90odHmq768uaHCP7PG7NPIEB9rF.png) ` (what you have right now)
I am trying to detect collision with a tilemap. It wont work currently. I am pretty new to godot. ![image|404x172](upload://90odHmq768uaHCP7PG7NPIEB9rF.png) (how it should be)

In general though:

  • Is the signal body_entered connected to the correct function using the Node tab (usually in the same section as the Inspector)?
  • Does the Area2D’s collision mask contain the tilemap’s collision layer? (Unless you have changed anything this should already be the case)
  • Are the collision shapes of the tiles set up?
  • Are you sure that the area actually ever intersects with a tile that has a collision shape?

I figured out how to use the debug option to see the collision box and i figured out the area2d was not moving properly with the players sprite. thanks!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.