ComputeFloorDist not accessible in 4.7.6

Well, I want to get the distance from the capsule and the ground floor.

I was told to use function computefloordist() in charactermovementcomponent.

But it seems that this function is not accessble.

BTW, my version is 4.7.6.

Is there any way to solve this problem?

CharacterMovement caches the most recent floor check in the CurrentFloor member variable. ComputeFloorDist() is used internally to fill in this result.

Hi,

We think this post contains useful information which we would like to share with our public UE4 community. With your approval, we would like to make a copy of this post on the public AnswerHub which includes the discussion but strips out your username and company name. Please let us know if you are okay with this.

Thanks!

Thanks for your answer, But I want to get the distance to the ground while the character is flying or falling.

It seems that we can’t get it in CurrentFloor variable.

In the meantime, you can use the CapsuleTraceByChannel node in blueprints to do a similar test using the capsule shape and your chosen trace distance, and use IsWalkable() to test if the hit result is a walkable surface.

Right, CurrentFloor is only valid during walking movement, we don’t try to find the floor in other modes.

I can expose ComputeFloorDist to blueprints for 4.9 if you think that would be helpful.

Feel free to make a copy on answerhub. :slight_smile: