In YoFrankie example :
The box in yellow is the "Feet" box.
In the script just after function onSceneUpdate() you can see theres is : coll = getNumCollisions(Feet)
so "coll" is the variable where is stored the number of collision for "Feet"
To describe the jump script below :
If "Feet" is colliding with something, then allow jump
If "Feet" isnt colliding, it wont jump
More complete info on feet box, to quote anael :
Feet box :
It's just a logic thing, if you want to know if the player touch the ground it is a simple way to do it. Because if you test if the main box is colliding with the room, it will detect also when colliding with the walls (we don't want). Because the main box is larger than the feet box, the feet box only touch the ground.
Hope it helps
Last edited by Vegas (2011-05-08 16:13:29)