Detecting collisions with tilemaps

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By schwiftypython
:warning: Old Version Published before Godot 3 was released.

Hey all. I’m trying to understand how collision detection works with tilemaps. I followed the tilemap tutorial and have collision set up for each tile. Just as an example, I’m trying to move a sprite through the tiles and navigate around the tiles with colliders. While I’ve come across a number of examples regarding detection between two sprites I haven’t seen anything specifically for a sprite and a tilemap. Very possible I missed that example so my apologies if that’s the case.

Bottom line: How do I check for collision between a sprite and a tilemap?

:bust_in_silhouette: Reply From: mateusak

It’s exactly the same thing. If it’s not working into your case, maybe it’s collision masks.