How to do a shape trace for the landscape actor?

Hi, I need to find the Z value of the surface of the landscape at a XY coordinate. The way I am currently achieving this is by using the code below.

if (landscape->ActorLineTraceSingle(hitResult, vector1, vector2, ECC_Visibility, collisionParams)
{
     Z = hitResult.Location.Z;
}

However, I have found out that line tracing a landscape can result in a bug where the trace just passes through the landscape without producing a hit. So, I would like to do a shape/sphere trace instead but I cannot seem to find any function that does such a trace of an actor. Can anyone please tell me how I can do this?

Update 1:
Tried implementing sphere trace using the following code:

if (world->SweepSingle(hitResult, vector1, vector2, FQuat(), ECC_GameTraceChannel1, FCollisionShape::MakeSphere(10), collisionQueryParams, FCollisionResponseParams())
{
     Z = hitResult.Location.Z;
}

ECC_GameTraceChannel1 is a custom trace channel made to be ignored by all except the landscape.

Using the code above to do sphere traces, even more traces managed to pass through the landscape than before.
Anyone has any idea what is wrong?

Update 2:
Alright, I seem to have fixed the problem. There seems to be some sort of maximum distance before the sphere trace loses the ability to “hit”. Lowering my start vector resulted in more hits while placing my start vector higher resulted in less hits. This could mean that the traces that did not “hit” the landscape was due to the distance between the start vector and the surface of the landscape exceeding this maximum distance. Note that my start vector is above the landscape while my end vector is below the landscape.

Anyways, thanks for all the replies guys~ =P Now, how do I mark this problem as solved hmm…

your updates helped. If the trace starts inside of the landscape, the landscape will not get detected. by starting my shape trace slightly above the landscape and having it then intersect during the trace generates an overlap