Detecting when CharacterController jumps

Hi!
Does anybody know how to detect when CharacterController jumps and how to differ it from just character falling down because for example he moved and fell to a platform below? Thanks for replies.

First of all you need to store the CharacterController.isGrounded and transform position from tha last frame

bool _wasPrevioslyGrounded;
Vector3 _lastPosition;

Best assign them in the LateUpdate(). When the jump occurs, the following conditions will be met:

_wasPrevioslyGrounded == true  CharacterController.isGrounded == false  transform.position.y > _lastPosition.y

Best regards,
Peter.