Dynamic Distance Calculation between player character and ground.

I want to develop a system that displays the distance between the player character and the ground/platform. When measuring the distance between two points at different heights, the calculation should start when descending, including movements at varying heights (while descending). How can a blueprint system be constructed to calculate this?

use linetrace by channel

1 Like

So here is what I made.


the problem is there is an extra 2 vectors (for Z axis) that is coming from somewhere I wasn’t able to find.
image
Or
image
If character is on an angled box/block/platform. I am guessing it is still related to capsule component.

Uh. Isn’t this just a raycast? Or, just get the two transforms and subtract their position and look at the difference in the world-up axis. If you want to know falling/rising look at the players velocity in world-down. I would definitely do this in code though.

2 Likes

You are right I can do this pretty easily in C++ than blueprints. I am trying to make prototypes with blueprints since it is much easy to just put together and find the errors. Also, I want to find out their limitations. But I am sure I am close to figuring this problem.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.