My fall damage system works by calculating the height using a line trace from the capsule component to the ground connected to the event tick. Storing it in the float variable “Character Height”
And it starts calculating the damage through the function which is probably not the most efficient. And stores the damage in another float called “TmpDmg”.
Then again connected to the event tick is the “Freefall” custom event which calculates is the z velocity is less than 0 and the character is falling connected to the branch which if true connects to a do once and another branch checking if the height is over 1500 and if its true, plays a falling animation montage. THEN on even landed it finally applies the damage stored in TmpDmg and then sets it to 0 again then resetting the do once.
when the line trace detects the height before jumping, after the character jumps it applies the damage (i know how to fix this). HOWEVER when i jump off the platform there is no damage applied on landed since the death animation is played on death.
So Ive done both these things, am i supposed to plug the output of the function falling damage into the apply damage on event on landed because Ive done that and exactly the same thing happens.
Here the initial 200uus deals no damage but Landing from 610 uus would deal 75dmg. You’d need to add the montage or some other bits but the damage dealing works with this script alone and is quite flexible.
however every time i jump it triggers the animation. I believe its because we are finding out the z coordinate from the origin 0 and not from the floor underneath. Could you help me find a solution.