# Get landscape material using line trace?

**URL:** <https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602>\
**Category:** World Creation\
**Tags:** line-trace, hit-result, unreal-engine, Landscape, question\
**Created:** [October 9, 2017, 10:27pm UTC](https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602 "2017-10-09T22:27:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_dd537c6e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dd537c6e](https://forums.unrealengine.com/u/anonymous_user_dd537c6e)\
**Post date:** [October 9, 2017, 10:27pm UTC](https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602/1 "2017-10-09T22:27:37Z")

</div>

If you build a landscape material with several layers (rock, dirt, grass, etc), can a line trace detect and return the layer name at a hit location? I can get my vectors accurately, so thats something at least.

I get the following results from breaking my hit result:

Physical Material: None  
Hit Actor: Landscape  
Hit Component: LandscapeHeightfieldCollisionComponent\_##

Trying to drill down further gives me errors or nothing…

 ![216196-materialhit.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/c/4/3c45443574ac9b18c6675889374fc7f304cd8628.png)

---

<div class="post-metadata">

**Author:** ![BenVlodgi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/benvlodgi/32/1194567_2.png) [@BenVlodgi](https://forums.unrealengine.com/u/BenVlodgi)\
**Post date:** [October 10, 2017, 11:05pm UTC](https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602/2 "2017-10-10T23:05:30Z")

</div>

Have you tried checking `Generates Overlap Events` on your landscape actor?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dd537c6e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dd537c6e](https://forums.unrealengine.com/u/anonymous_user_dd537c6e)\
**Post date:** [October 10, 2017, 11:23pm UTC](https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602/3 "2017-10-10T23:23:33Z")

</div>

Yeah, no luck. Have been fiddling with all the settings as per similiar posts.  
Would really like to know if others have done this and its just me that can’t figure it out.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dd537c6e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dd537c6e](https://forums.unrealengine.com/u/anonymous_user_dd537c6e)\
**Post date:** [November 2, 2017, 8:55pm UTC](https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602/4 "2017-11-02T20:55:31Z")

</div>

I can detect that it hits the landscape material, but that in itself is pretty useless. Which layer am I hitting? Lava, grass, etc… information that would actually be useful.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_dceb25d5](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_dceb25d5](https://forums.unrealengine.com/u/anonymous_user_dceb25d5)\
**Post date:** [November 2, 2017, 9:03pm UTC](https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602/5 "2017-11-02T21:03:08Z")

</div>

Try this…

[https://forums.unrealengine.com/development-discussion/content-creation/3698-different-footstep-sounds-on-different-materials](https://forums.unrealengine.com/development-discussion/content-creation/3698-different-footstep-sounds-on-different-materials)

---

<div class="post-metadata">

**Author:** ![Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anonymous\_e5d5c0bf7d300728867097ff79906dbe](https://forums.unrealengine.com/u/Anonymous_e5d5c0bf7d300728867097ff79906dbe)\
**Post date:** [July 23, 2018, 8:47am UTC](https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602/6 "2018-07-23T08:47:10Z")

</div>

Did you solve it ?  
I have the same problem :()

---

<div class="post-metadata">

**Author:** ![mengineZZ](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mengineZZ](https://forums.unrealengine.com/u/mengineZZ)\
**Post date:** [August 17, 2025, 2:19pm UTC](https://forums.unrealengine.com/t/get-landscape-material-using-line-trace/406602/7 "2025-08-17T14:19:30Z")

</div>

I have the same problem. Have you found a fix?
