Line Trace suddenly returns wrong hit location

Hello together,

I want to stick a XYZ plot of a path to the ground. Therefore, I go along the path and make a LineTrace down-/upwards to find the hit location and therefor the ground level’s Z value to apply it to the XYZ path. I hope everybody understands what i mean?

This works actually quite well, in apparently random areas from my landscape. In some other areas the hit points I get returned from the LineTrace function just makes a sudden drop and gets misplaced for no apparent reason. There is nothing special in this area of the landscape (I checked the collisions, it is flagged as a two sided geometry,…) nor are there any other objects within that area.

Here are the original paths searching for the ground (notice that we are below the ground in this area all the time):

Here is the Debug Lines of the Traces:

And here is the resulting plot:

This is what the landscape’s collision looks like (the ground is one layer of polygons without any thickness, which is why I enabled two sided collision. Underneath is nothing than empty space):

Here is my Blueprint doing that:

Has anyone an idea what is happening there and what I can change to fix it?.


Haven’t you got the branch outputs from the second line trace the wrong way round? It’s getting the impact point data when the return value is false (no hit)…

Thanks for your input, but I think I did that part right. This part of the code works for all the point before that area of my landscape. But I have to admit, that my node arrangement is a little bit misleading.