0 votes

This is a seemingly random occurrence that tends to pop of every few times I load a level. I'm using a raycast to detect whether the player in standing on an Ice tilemap, which I have overlayed on top of a normal ground tilesmap. The Ice tilemap is above the normal Tilemap in the node list, so it should, and typically does, take priority during collision and proclaim that the player is on Ice .However, every now and then it doesn't.

Sometimes it doesn't work for every Ice tile in the level. Other times it will work for most of them, but a few tiles here and there won't work. I'm not sure why this is happening. Printing the raycast collider shows it isn't recognizing the ice.

One thing I've noticed is that I haven't been able to get the glitch if I minimize the Godot Editor before loading the level in the game. The editor causes FPS lag during play, so typically I minimize it when testing things, however there are times when I'm not testing any that needs it minimized so I'l just leave it open. Could the lag be interfering with the node's load order or something? Is there a better way to prioritize raycast collision with overlayed bodies?

in Engine by (436 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.