I'm playing around with tilemaps to create levels and have run into a problem with collisions on tiles. I've created the tiles with a sprite/staticBody2D/CollisionPolygon2D, and converted to a tres file, before creating the level itself in a separate scene (see linked image for reference).
So far, so good, however, when I get to instancing the scene in main, my player's raycast seems only to collide with certain blocks. When I go back to the source and check the collisions, the ones that are colliding with the raycast all have the same colour (pink/purple) at the top of the tile (again, see image - blocks 1,4 and 8 going left to right, top to bottom). I also have a 'bad polygon' error, but I can't find anything on that particular error message.
My question is, do these colours actually mean anything, and how can I more carefully determine what ones will come out when i'm creating CollisionPolygons? Alternatively, if i'm barking up the wrong tree could anyone suggest where i'm going wrong (already tried playing about with the RayCast2D length, and have double-checked layer masks).
Thanks in advance!
EDIT - My raycast was starting underneath the block it was trying to detect - by shortening and moving up slightly it worked almost perfectly.