I'm working on a physics based game and I'm trying to figure out how to allow players to jump, but not jump when they are in the air.
That is easy enough to do by itself, but I'm not sure how to prepare that for the case when they fall off a ledge.
For instance, if the player touches the ground, they can jump. If they jump, they can't jump until they touch the ground again. But there's no event for detecting the lack of a collision happening, so I can't make the player unable to jump after they walk off a cliff.
Is there any way to fix this only with the physics behavior?