.cp3 link https://drive.google.com/open?id=1RBqWtX3ymDUtZAPNY82qM4IW7BTPuDK5
WHAT YOU'LL SEE: Looking top-down, you'll see grey squares ("Ceiling tiles") falling down at random rates. Z Elevation is basically being reduced each. The purple shape is the Player Character (use WASD or arrow keys to move and B to jump). The red/pink circles are Energy Bases and have the Solid behavior.
THE GOAL: As the Tiles descend, they'll come within range of the Player's ability to jump above them. The idea is to be able to jump on top of them and make it appear as if the Player is actually standing on top of a Tile. However, if the Tile is clearly too low, the Player's max jump height is cut short. ...Like Mario Bros but with a different camera angle.
CURRENT ISSUE: The problem I discovered is that if the Player is overlapping at least 2 Tiles, I have no clear way to discern which one is the lower one. Off the top of my head (meaning, not yet tested), I could stuff all the Z Elevation values into an array and sort then pick by ascending/descending values, but I'm wondering if there's an easier way.
Further, I discovered (tested) that even when overlapping just one Tile, the Player still can jump up and through it. So my effects to use Clamp( ) doesn't seem to have any effect.
I was hoping someone could help me identify if my current set up is off or if I need an entirely new approach. Thanks!