Landscape has no 'interior collision'

Hey guys!

So I’m having some issues with Landscape collision.

My goal is to detect when an actor has been placed inside landscape, (accidentally, by a level designer) so that I can take appropriate actions to correct this from C++. Unfortunately, despite my best efforts, I cannot seem to get any kind of a collision happening with the space inside a landscape proxy actor. Any trace from the outside of the landscape will collide correctly with the surface of the landscape, but any trace from within will be treated as if it were just sailing through totally empty space. The correct functionality would be that any trace originating from within the collision of a blocking actor should immediately return a hit, as is the case with staticmesh actors.

Is this simply a limitation of the landscape collision system, or am I missing something obvious?

See attached screenshot.

Ok. I think i’ve found a suitable workaround.

Two things :

Landscapes have a “CollisionThickness” float which appears to control how much of the interior space of the landscape is considered ‘blocking’. Setting this to some absurdly large value (i’m using 100K currently, and may go higher) appears to ‘fill’ the interior space in so that it blocks encroachment checks.

Using World’s “EncroachingBlockingGeometry()” function at a specific point inside the landscape, after the thickness has been set appears to give the desired result. Traced seemed to still be failing / not hitting anything, but this is a viable solution.

Hey AJQuick-

Looking at your screenshot it appears that you are attempting to do a trace from an actor/object that is under the landscape, back to the landscape itself. Can you confirm if this is what you mean? If this is the case the behavior you’re seeing is expected as a landscape is a one sided object and does not have collision from below. It does however sound as though you were able to find a solution to work the way you want. If so, feel free to mark your answer as accepted.

Hi , the trace I was performing was from the location of the actor directly downward.

Here is a rough sketch of my understanding:

If this is how your landscape is setup then the same explanation applies. The “flat” portion of the landscape does not continue across where the raised portion begins so anything below the raised portion is considered “under” the landscape rather than “inside” it. Your workaround of incresing the collision thickness would be the best solution as it makes the landscape respond to collision events in a larger Z range.

Thanks for the explanation!

This is broken as of 4.14!

It would appear that ‘Collision Thickness’ is deprecated, but has not been marked as such? I can’t find anywhere in the engine code where this value is actually used.

figured it out.