Trackable point on Static mesh?

Currently working with a terrain actor that has a static mesh, and i want to be able to calculate the distance from the player character to the closest point on the terrain mesh. I have not found any ways to do this, as comparing the actor locations of both objects uses the terrain actor’s origin, rather than a point on the surface of the mesh. Functions like local bounds only return dimensional information on the static mesh.

Is this possible? and if it is, where can I find more on how to do it?

Any and all help is welcome.

1 Like

A line trace would fit the bill here.

1 Like

Thank you for the response! I’ll definitely use this for the distance to the mesh. This is a question on implementation, but my current plan is to now use a function to create an arc of line traces from the player to the bounds of the terrain actor and use the shortest line trace in the arc. are there any glaring issues with this approach?

Thank you for your answer!

1 Like

You could certainly give that a go.

I answered a question the other day, about how to trace in a arc :slight_smile:

2 Likes

extremely useful, thank you!

1 Like