How to get z-axis value of a landscape based on x, y value?

I created a landscape in my game, and I want to create an character stands on it, so I need to get z-axis value based on x, y axis value, like:

float GetZAxisValue(float x, float y);

Any ideas?

A same question found in AnswerHub, still no answer.

I am not sure why you need to do that?

Can you provide more information regarding your particular scenario.

simply speaking: Given x, y value, how to get z value of a point on a terrain

Simply speaking: Given x, y value, how to get z value of a point on a terrain?

I want my character moves on the terrain

can you see my reply?

I found a same question in AnswerHub, but there is no answer.

I dont know much about the terrain system in Unreal, but maybe a SingleLineTrace could do the trick, shooting from a point high above the terrain and at the given x,y coordinates down? You had to set the trace parameters accordingly, to trace just terrain of course.

Wouldn’t you just use the normal capsule for collision and character movement in the character blueprint then?

It sounds like you over-complicating things slightly and that is why I asked the question.

Setting Up a Character

How to Set Up Character Movement in Blueprints

Yes, SingleLineTrace is what I want, It works fine.
Thank you very much!