# Line traces rotated

**URL:** <https://forums.unrealengine.com/t/line-traces-rotated/2532565>\
**Category:** Programming & Scripting\
**Tags:** question\
**Created:** [May 29, 2025, 9:19am UTC](https://forums.unrealengine.com/t/line-traces-rotated/2532565 "2025-05-29T09:19:37Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![FarFromBest](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FarFromBest](https://forums.unrealengine.com/u/FarFromBest)\
**Post date:** [May 29, 2025, 9:19am UTC](https://forums.unrealengine.com/t/line-traces-rotated/2532565/1 "2025-05-29T09:19:37Z")

</div>

Hi! I would like to use four line traces to check a wall, tried the first one with an offset on the right (First pie image) but when rotating (second pie image) the line trace goes wrong, I would like it to trace same way than first, witch nodes do I need ?

 ![TEST1.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/6/c865f554fdbddec59fd0a63ff18bfb5281141aa8.jpeg)  
 ![image_2025-05-29_111814856](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/1/2/2127a062d4263d97f3fbdcf6fa2e3f8e39f8b57a.jpeg)  
 ![Linetrace](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/8/6/986d79a50a2004f39f1f29cb485bd6db01d84186.png)

---

<div class="post-metadata">

**Author:** ![Kemichar](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/kemichar/32/1069671_2.png) [@Kemichar](https://forums.unrealengine.com/u/Kemichar)\
**Post date:** [May 29, 2025, 9:52am UTC](https://forums.unrealengine.com/t/line-traces-rotated/2532565/2 "2025-05-29T09:52:33Z")

</div>

You’re offsetting your start/end locations **in world space** by 100 units on the Y axis, so that offset will always be in the same “direction” no matter how you rotate your character.

For a minimal change, I suggest replacing both “+” nodes with something like this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/9/5392af6fd83952ef1729077b9a048b10a4e0d6de.png)

---

<div class="post-metadata">

**Author:** ![Vahab](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vahab/32/1148756_2.png) [@Vahab](https://forums.unrealengine.com/u/Vahab)\
**Post date:** [May 29, 2025, 10:01am UTC](https://forums.unrealengine.com/t/line-traces-rotated/2532565/3 "2025-05-29T10:01:36Z")

</div>

It would be good to calculate the base location and cache it once, then use it later

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/d/c6d9ef0715f10794a34b64b636f2d83b6bf4b478.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/b/7/2b7138e62843c0f56ee797027f3b0557f19415dd.png)

---

<div class="post-metadata">

**Author:** ![FarFromBest](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FarFromBest](https://forums.unrealengine.com/u/FarFromBest)\
**Post date:** [May 29, 2025, 10:57am UTC](https://forums.unrealengine.com/t/line-traces-rotated/2532565/4 "2025-05-29T10:57:16Z")

</div>

Thanks! Caching the base location seems to be obligatory in these cases, I understand more!  
Got this result :

 ![image_2025-05-29_124722158](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/c/17c4e70c3a5b0734d7a209439c430a5761181619.jpeg)  
Witch for me, seems exact from the script, right ?

 ![image_2025-05-29_125110438](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/1/471efb99856986416e7f3634f3429cbe65760166.png)

Since that, I may handle this :

 ![WallCheck](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/4/3/f431d211ad8e768915ff5962e14adecacd475cc6.jpeg)

Thanks alot

---

<div class="post-metadata">

**Author:** ![Vahab](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vahab/32/1148756_2.png) [@Vahab](https://forums.unrealengine.com/u/Vahab)\
**Post date:** [May 29, 2025, 11:32am UTC](https://forums.unrealengine.com/t/line-traces-rotated/2532565/5 "2025-05-29T11:32:36Z")

</div>

I’m glad that helped you! Please feel free to mark the reply as answered.

---

<div class="post-metadata">

**Author:** ![FarFromBest](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@FarFromBest](https://forums.unrealengine.com/u/FarFromBest)\
**Post date:** [May 29, 2025, 11:45am UTC](https://forums.unrealengine.com/t/line-traces-rotated/2532565/6 "2025-05-29T11:45:00Z")

</div>

Well, I passed 10 minutes to find out how to mark the topic as “Resovled”! How do we do lol!

---

<div class="post-metadata">

**Author:** ![Vahab](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/vahab/32/1148756_2.png) [@Vahab](https://forums.unrealengine.com/u/Vahab)\
**Post date:** [May 29, 2025, 12:11pm UTC](https://forums.unrealengine.com/t/line-traces-rotated/2532565/7 "2025-05-29T12:11:57Z")

</div>

I found that you should edit your post and add a Question tag, then the solution button will appear!  
Here is the link to the solution

> [@How do we mark a discussion as solved?](https://forums.unrealengine.com/t/how-do-we-mark-a-discussion-as-solved/753703/2):
>
> You have to start the post as a question. Then the solution button will appear. Once the solution button has been clicked, it disappears. It is possible to change the post to a question after it has been posted.
