void OnControllerColliderHit( ControllerColliderHit hit )
{
if (hit.normal.y > 0 && hit.normal.y > groundNormal.y && hit.moveDirection.y < 0) {
if ((hit.point - lastHitPoint).sqrMagnitude > 0.001 || lastGroundNormal == Vector3.zero)
groundNormal = hit.normal;
else
groundNormal = lastGroundNormal;
hitPoint = hit.point;
frameVelocity = Vector3.zero;
}
}