Jump glitch

as a test i setup a basic platformer in blender to develop my skills. I made a small scene and a cube with simple controls using logic bricks (no python). It works fine, but if I jump and collide with the bottom of a platform and keep holding jump key, it sticks until you release the key. heres a video i took of it https://i.gyazo.com/a41e6a9a39e1dcb1d79d5259187d1de1.mp4

When you press the key and it activate the jump actuator, it will make the character jump, as long as it hasn’t jumped before or collided with a surface (presumably the ground).
But since there is a ceiling, the game doesn’t know how to tell if it’s the ground or ceiling, it’s just colliding with a surface, so it jumps, thus keeping you afloat on the ceiling.

You simply have to define when it’s on the ground, so make it jump only when it’s on the ground. Which can be done with a Collision sensor simply, watch the video I made and you’ll see what I’m talking about.

You can also use “Radar” sensor with an angle of 90 degrees and distance 1,5 (bigger than object’s radius). Then you don’t need any extra objects to separate ground.