Issues with raycast2d and tilemaps

Godot Version

Godot Engine v4.4.1.stable.steam

Question

I’m trying to make a platformer that uses a tilemap for many elements and features an enemy with a raycaster attached. I am having an issue where the raycaster won’t detect the tilemap even tho the collision has been set up properly (I thnk, the mask and layers are the same as some bodies that the raycaster CAN detect). Is there something you have to do to get raycasters to detect tilemaps?

No, it should detect it as long as the layers/masks are correctly set up and RayCast2D.collide_with_bodies is enabled (it’s by default). Try posting some screenshots and code.