# Linetrace goes through Landscape \[UE4\] and \[UE5\]

**URL:** <https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788>\
**Category:** World Creation\
**Tags:** unreal-engine, UE5-0\
**Created:** [June 7, 2022, 1:35am UTC](https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788 "2022-06-07T01:35:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ViktorNR17011](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ViktorNR17011](https://forums.unrealengine.com/u/ViktorNR17011)\
**Post date:** [June 7, 2022, 1:35am UTC](https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788/1 "2022-06-07T01:35:47Z")

</div>

![LandscapeBug1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/b/7/5b7cc056dc0b103112cc040b5503a97dc2d8eadf.jpeg)  
 ![LandscapeBug2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/d/e/0de9b9deb041333a2aba0eb660a3f027c308a9d8.jpeg)

First image is UE4, second is U5. Both have problems when doing a Linetrace on a steep landscape.

This is done in Blueprints:

 ![bleurpints](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/c/28cefadb39a52b78182a40012998bc41b7085359.png)

---

<div class="post-metadata">

**Author:** ![Humanasset](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/humanasset/32/251551_2.png) [@Humanasset](https://forums.unrealengine.com/u/Humanasset)\
**Post date:** [June 7, 2022, 6:15am UTC](https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788/2 "2022-06-07T06:15:04Z")

</div>

I had this problem in the past. I can’t remember exactly how I solved it, but it was happening on character meshes as well. I do know that it was because apparently hit locations are approximate and the line traces can fall a tiny bit short of the object you’re trying to trace or vice versa.

I’m not sure about UE5 at the moment, but UE4 you can increase the collision thickness of the landscape to help combat this issue. As for the character problem I was encountering because of this I had to manually add a tiny float value increment to push the trace forward a centimeter or 2 from the impact point to ensure it was hitting the mesh appropriately and it was solved 100% since. I’m sure this is the issue with your landscape, I would have to look back at the project and see exactly how it was done on the landscape itself, but you can look in this direction and maybe solve it sooner.

p.s. I _think_ ccd continuous collision detection is a part of this, but I just remembered having to fool around with that also.

---

<div class="post-metadata">

**Author:** ![Joe\_Radak](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/joe_radak/32/1197589_2.png) [@Joe\_Radak](https://forums.unrealengine.com/u/Joe_Radak)\
**Post date:** [June 7, 2022, 1:05pm UTC](https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788/3 "2022-06-07T13:05:27Z")

</div>

I’ve moved this over to World Creation category, you’ll have a better audience to answer this question there! The Unreal Online Learning feedback forum is for providing feedback on Epic made learning content.

---

<div class="post-metadata">

**Author:** ![BIGTIMEMASTER](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bigtimemaster/32/710746_2.png) [@BIGTIMEMASTER](https://forums.unrealengine.com/u/BIGTIMEMASTER)\
**Post date:** [June 7, 2022, 3:08pm UTC](https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788/4 "2022-06-07T15:08:01Z")

</div>

I’ve used capsule trace for things like this.

---

<div class="post-metadata">

**Author:** ![SimplestWay](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@SimplestWay](https://forums.unrealengine.com/u/SimplestWay)\
**Post date:** [September 16, 2023, 9:55am UTC](https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788/5 "2023-09-16T09:55:10Z")

</div>

Anyone who met the same problem, here is the solution:

> [@Line Trace goes through Landscape](https://forums.unrealengine.com/t/line-trace-goes-through-landscape/383019/5):
>
> I tried many different combinations of those yesterday and any of them didn’t do the trick. I changed it back to block, as it was as default and it’s not helping either.

make sure your line trace start is the heigher point.

---

<div class="post-metadata">

**Author:** ![GoldenSlammer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GoldenSlammer](https://forums.unrealengine.com/u/GoldenSlammer)\
**Post date:** [June 26, 2025, 8:12am UTC](https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788/6 "2025-06-26T08:12:57Z")

</div>

> [@SimplestWay](#):
>
> make sure your line trace start is the heigher point.

This inspired me to my solution, I noticed my footstep linetraces were no longer detecting terrain physical surface/surface types in certain areas. It started I believe after I added some variations to the terrain height.

I changed my linetrace from starting just at getactorlocation (xyz 0) to getactorlocation z axis - 80 and I set the linetrace to end at getactorlocation z axis -120, **this means the line trace begins just above the terrain by a few inches and ends right under it** which solved it.

 ![linetrace](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/2/5325b7f1753671c01a8a727fd886f75bccb65f07.png)

---

<div class="post-metadata">

**Author:** ![Rev0verDrive](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/rev0verdrive/32/907214_2.png) [@Rev0verDrive](https://forums.unrealengine.com/u/Rev0verDrive)\
**Post date:** [June 28, 2025, 6:25am UTC](https://forums.unrealengine.com/t/linetrace-goes-through-landscape-ue4-and-ue5/575788/7 "2025-06-28T06:25:45Z")

</div>

I’ve been tracing from Foot bone for 8 years now.

Start: Get foot socket location of stepping foot. Add 20cm to Z.  
End: Start - 200cm on Z

Has worked 100% for me.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/7/0c779c038de4c2ab987fe623436e2aeb5e81dae2.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/f/fbffdde4419e947a1dec6c82d5fc7078936ed525.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/b/c/fbcf76189ac20372d8fa20b5a903f1e042e761fe.png)
