Hello again! I've got a platformer where the player stays fixed in the center of the screen (horizontally) but moves up and down. You move the player object through the level by panning (dragging) the level itself back and forth. This works great, but when the player comes to a wall, the wall just pushes the player back, sometimes even off-screen if you drag far enough.
I fixed this by setting the player position to X = 240 (center of the screen) for every tick. Now the player stays fixed in the center like I want, while still moving up and down.
But now the walls just move straight through the player even though they are both solid.
What I'd like to happen is for the level to stop panning when you try to drag it through the player.
Here is a visual of the level:
(Ignore the swirl on the player, that's an effect for the end of the level)
When I pan that wall to the left, into the player, the wall is supposed to STOP moving. The idea is to wait until the player goes up or down and THEN you pass the wall under/over the player to keep moving, but as I said this doesn't work. Now that the player is fixed horizontally the walls/player just pass right through each other.