Author Topic: Jumping Function  (Read 758 times)

I am wondering if there is a way to detect when a player jumps. I know about Armor::onTrigger, but that does not keep calling the function if the player holds down the spacebar. I am trying to call a function every time the player successfully jumps. Is there a way to do this?

You could use a datablock with a very low minImpactSpeed and use the function armor::onImpact as well as armor::onTrigger to detect each jump.

You could use a datablock with a very low minImpactSpeed and use the function armor::onImpact as well as armor::onTrigger to detect each jump.
Wouldn't this also happen when you hit a wall then press space?

Wouldn't this also happen when you hit a wall then press space?
You could use a downward raycast to check if they're on the ground.