Please Critique - Damage System for Falling

Here is my system for applying damage to a player based on how long player was in the air before hitting the ground.
It works but as expected, but I would like some critique if anyone knows a more efficient way to handle this.

Link to full size image:

&d=1453846396

I did a simple Fall Damage system some time ago.

Basically all i did was get the Players Velocity while they were falling and assign it to a variable. Once they stopped falling, if their last known velocity.z exceeded a preset value i applied damage based on the amount in excess. This has the added bonus of applying damage proportional to the height that the Player feel from.

thanks!

Your setup sounds a little cleaner than what I put together.
Mine works, but it needs to make a lot of function calls if I want to be precise.
Your suggestion can be very precise with less work.
I think I will give it a try

You will notice that with my example system that if the Gravity isnt enough to make the Players Terminal Velocity exceed the Fall Damage Velocity Threshold then no damage will ever be applied. So if your on the moon for example, falling from 50meters in the sky will not cause any damage since the Terminal Velocity of the Player would likely not ever exceed a reasonable Fall Damage Velocity Threshold.

If you had have based your Fall Damage System on time spent not on the ground like a lot of people seem to do (new people to game dev), you wouldnt get the added bonus of removing the Gravity Scale out of the equation.

Gotta go for DevilsD’s version too. Too many problems just basing it on time in the air. For example if you decide you want to add a double jump function, or jetpack or something then they will be off the ground for a longer period but potentially not falling any further.

Another simple way is to do a raycast down from the player and check its length from the player to the ground . If it is over a certain distance player must be falling so apply damage .