Linetrace isnt findind z of landscape

I have a line trace that im trying to use to find the z coordinate of the landscape so I can spawn an actor on it. It always gives me a zero for the z coordinate.

Hi, @xXMeisthabestXx!

This worked with WorldStatic on terrain:


The only thing I can’t confirm as identical would be your start and end, so it may have something to do with your start and end locations. :slight_smile:

Would it matter if the landscape is from the open world level template?
Also my start is about 10000z (probably a bit dramatic) and my end location is at 0z which should be about 100 units below the landscape

It does matter- kind of!

The default open world landscape does start at Z=0 and goes on for a while in all directions at 0. I even tested this just now by making a new default open world level (and got 0) then I moved the starting location to the hilly areas and I was getting between 100 and 200 Z with this exact setup! :slight_smile:

I would say check your collision profile for the terrain but if you’re getting X and Y that isn’t an issue.

I’m at work right now, when I get home I going to try moving to the hilly areas and see what I get. I looked at the section of landscape I am on, in the world outliner is says my location is at z100.
I’ll try a different spot when i get home

Ah that might be a misconception then! If it’s saying YOUR (as in your character’s) position is around 100, that would be correct- it’s using the center of your character, not the surface of the ground itself. :slight_smile: Naturally your character is about 1.8m (180 unreal units) high, so half of that comes out to 92. :slight_smile:

I worded that wrong
I meant that when i highlight the landscape region in the world outliner it says the z coord is at 100. But it seems that it is actually at 0. Im still not sure why details says z is at 100.
Im sure its just something i dont understand

So when you select the landscape in the world outliner, the Z coordinate says it is at 100… To be clear, we’re not referring to the actual height of a point on the surface, right?

Now, you say it “Seems that it is actually at 0.” How are you gathering that information?