Death by Falling — No Dead Zones, just Impact
Objective: make the player die after a long fall with an impact on a platform
I thought that also a drastic impact on a platform should be lethal. This means that, apart from the use of dead zones, we need to implement a feature that would recognize such impacts — after a long fall — and make the player die.
Since we have a working death logic, we should try and use it also in this scenario.
One way of detecting a lethal fall is by measuring y-velocity: if it is lower than a given negative value (so big in absolute value), there will be no chance of surviving! As a start, I chose -50.
We need to check for this value while the character is falling. Fortunately, we know that when this happens, a state behaviour is already working in the falling script and we can put there our logic. Basically, on update we check the y-velocity when the player is finally grounded: if it is over the threshold, we call the death logic which will take care of everything concerning death, otherwise, we land as usual.
As simple as it gets!