Detect if a rigid body is "on the ground"



I’m using nphysics in a 3D platformer where the player is a rigid body. I need to be able to detect if the player can jump. The player basically moves in the x,y plan and can translate on z axis for jumps but it doesn’t rotate around x/y axis.
The “ground” is currently an horizontal plan with some other rigib bodies lying on it. What would be the right way to check if the player in not in the middle of a jump, i.e its bottom is currently in contact with some other rigid body from the world ?


For information, I ended up using a very fast, but dirty hack : observe the player vertical speed over 2 game ticks.
If the speed goes from negative to positive, it means the player just bounced on the ground. There are probably lots of corner cases where this doesn’t work so I’m still interested in a more physical way.