Hi , does anyone know how to get the z value for terrain at a particular x and y world coordinate using c++?
I could look at the height map itself to calculate heights, but all that would give me is a height of a peaks and troughs, rather than at some point in between them, which is what I’m after.
Googling around it would seem that a line trace may be the answer I am looking for, but I can’t find any C++ examples of this, or even anything similar that I could adapt for my purpose.
Ultimately I want to use C++ to align spline meshes to terrain. An easy job, if I can just get a terrain Z values whilst I’m getting the x,y location values along a spline.
Thanks Newest, that’s extremely helpful, I can use the X and Y from getdiatancealongspline at increments and just set my start and end locations as well above and below my terrain. Happy days