Capsule Distance to landscape

Hello everyone, I was wondering how I can get the distance between the player capsule and the landscape (Z value), even if the landscape has hill or like a pit.
For example if the player is jumping, how can I get the distance between the player and the landscape?

Any help is appreciated :slight_smile:

Line Trace down from the capsule bottom, subtract the hit location from the capsule bottom location, get length of the resulting vector.

Z Distance posted by anonymous | blueprintUE | PasteBin For Unreal Engine

1 Like

Thanks a lot!