Get Display Name == Lanscape

Hi all

Anybody know why check pic:

“Get Display Name == Lanscape” this works when running in the editor but when I package it stops working

thanx GARTH

Thanx for the quick reply

any ideas how to get the landscape as an object.

You could take your Hit Actor and Cast To Landscape - if successful, it’s a landscape.

Or take your Hit Component and Cast To LandscapeComponent - if successful, you’ve hit a landscape.

Or you can use GetClass on the Hit Actor and see if it equals Landscape.

Or GetClass on the Hit Component and see if it equals LandscapeComponent.

Or you could apply custom physical material to your landscape, and then check if the HitResult::PhysMat matches.

Thanx for the reply

what you suggested works but I have other mesh in the level that form part of the Landscape and they need to pass the test.

after a little bit of testing I found that “Hit item” returns a “-1” for the landscape and my landscape mesh but for the foliage it returns a higher number.

a6f86b37a21f72f2c0f0ae069ff20ab0a066ae77.jpeg

and this work great to eliminate the foliage and only pass for landscape objects

Thanx for the assist.