I’m trying to make water, and if the player is in the water his ySpeed is negative. That works fine, but he bounces in and out of the water when he reaches the top. I want to make it so that the water object (I’m using grids here) detects if any other water object is above it in a certain range (within 2 pixels), if not, it’s a special top-water-object which makes the player’s ySpeed = 0.
How do I check this?