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?
Updates:
A same question found in AnswerHub, still no answer.
https://answers.unrealengine.com/questions/49367/undefined.html
qdelpeche
(qdelpeche)
April 16, 2015, 6:01am
2
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?
I want my character moves on the terrain
Marvelius
(Marvelius)
April 16, 2015, 7:13am
8
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.
qdelpeche
(qdelpeche)
April 16, 2015, 7:23am
9
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!