In my game I have a layer called "objects" and in front of it a layer called "front". Randomly there are objects "peeking" up on the "objects" layer and then they slide down again. While testing I discovered that the hidden objects can be tapped through the covering objects on the "front" layer. How do I get rid of this?
Any help would be greatly appreciated!
Thanks
Develop games in your browser. Powerful, performant & highly capable.
Use Is Layer X visible (or invisible)
Already tried that, didn´t work
I think the problem is the collision box that travels up and down with the object. I want the object to be touchable all the way down until he is hidden behind the front layer.
Sounds like some sort of comparison is called for. For example only allow the click when the object is under specific y coordinate (if the peeking happens upwards).
Yes that seems tobe working
Glad to help.