Raycast2D not colliding with tile

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By VF_Miracle

I’m trying to create a “line of sight” system for my game, so I have a Raycast2D coming out of one of my characters and into an enemy.

The problem is that the raycast doesn’t detect the collision with the tile that I’ve set the collision mode on, in the tileset.

The Raycast2D is enabled and both it and the tilemap ara in the same collision mask. But the “is_colling()” method still returns false.