|Topic was automatically imported from the old Question2Answer platform.
The game I am currently working on, is meant to be infinitely scrolling vertically, but with a fixed width. I need to however, prevent players and mobs from leaving this horizontal plane. I tried adding StaticBody2D nodes as children of the parallax layer and setting their collision shape to rectangle, which semi-worked. The problem was, that this method led to some gaps in between the walls that the player could pass through. I scaled the collision shape to be the same size as the mirroring of the parallax background but still had this problem. I even scaled the collision shape to be larger than the mirroring of the parallax background, however it still did not work.
I’m really not sure what else I could do.