Preferred "On ground" detection

I am trying to tweak my code that detects whether the player is touching the ground whether they should be allowed to jump when they press the jump button.  There's a possibility they could be on top of another player and I'd like to give the ability to jump if they are standing on the goal, anywhere on the terrain, or even on top of the soccer goal.  What's the best way to go about this?  Do I have to cycle through every object in the world to detect if I'm in contact with one and if it's below me?


using jme, ode or a calculation of your own?

What about using contacts as you did in RollingFriction? No need to iterate through all objects then. Then check if the object with contact is below…

what is youre ground ??? a quad or a terrain block

Irrisor, an interesting idea…I'll look into that further. :slight_smile: