How to obtain landscape height?

I want my objects to always be above the landscape, but not getting affected by the other actors around. I want to set their height to always be a set value.

Line Trace to landscape, break Hit Result, and use Hit Location to offset your actor transform.

What if there are objects blocking the trace? That’s my problem. I want to only hit the landscape I don’t know how.

You need play with the trace collision channel or object type. You can either use pre-existing types or you can go into project settings and create new ones.

Is there away to create a channel just for landscapes?

Hi Valkon,

If you create a channel called “landscape” then go to your landscapes collision settings and place it to custom you should be able to set the channel to your custom channel. Then in your trace by channel you tell it only to look for landscapes.

That actually sounds like a good idea. Is that how locked targeting works? You trace channel a specific channel and then send projectile?

But I don’t want it to miss even if they moved. Is that what find look at rotation does? After it launches I want it to 100% hit them to cause damage. Is that possible? More like RTS ranged characters

With locked targeting you can trace by channel for specific channels, but then you want to cast to a specific type of object (for instance, enemy AI). When you cast to them and it succeeds, use “find look at rotation” when you spawn a projectile, causing it to fly in that direction.

At that point you would want to use the find look at rotation and plug it into a Vinterp to the targeted location without working about projectile movement. You spawn it in and it travels to the new location by the shortest distance possible.

Thanks :D…