# How can I rotate a line trace array?

**URL:** <https://forums.unrealengine.com/t/how-can-i-rotate-a-line-trace-array/402660>\
**Category:** Blueprint\
**Tags:** line-trace, for-loop, unreal-engine, UE4, question, Blueprint\
**Created:** [August 23, 2017, 8:17pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-line-trace-array/402660 "2017-08-23T20:17:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![The\_Pedullist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_Pedullist](https://forums.unrealengine.com/u/The_Pedullist)\
**Post date:** [August 23, 2017, 8:17pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-line-trace-array/402660/1 "2017-08-23T20:17:10Z")

</div>

Hello Unreal Community!

I have a blueprint question that has me stumped. I’m creating an editable grid for placing windows on a building using blueprints.

 ![210936-constructionscript.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/7/f/47f060ccb23ed168f6fdcce4e9337c0df86b8f98.jpeg)

The For Loop generates a 2D array and uses line traces to snap the windows to the surface and align them to the normals of the mesh as seen here:

 ![210937-working.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/8/378f15a4fe9ba2b758ad6d4791d27e7467a28719.jpeg)

However, when I rotate the building, the line traces stay in place causing the windows to rotate incorrectly. How can I apply a rotation to the line trace array so that it can be controlled in my blueprint?

Thanks for the help!!

---

<div class="post-metadata">

**Author:** ![cmarston74](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@cmarston74](https://forums.unrealengine.com/u/cmarston74)\
**Post date:** [August 25, 2017, 8:35pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-line-trace-array/402660/2 "2017-08-25T20:35:43Z")

</div>

Why not add the windows as child actor components to the building mesh? Then it becomes an issue of child management and rotation will follow accordingly when the parent rotated the children rotate correctly.

---

<div class="post-metadata">

**Author:** ![The\_Pedullist](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@The\_Pedullist](https://forums.unrealengine.com/u/The_Pedullist)\
**Post date:** [August 28, 2017, 2:44pm UTC](https://forums.unrealengine.com/t/how-can-i-rotate-a-line-trace-array/402660/3 "2017-08-28T14:44:26Z")

</div>

I solved my issue by multiplying the x axis value that created space between the items in the array by thy right vector of an empty scene component. Image attached for reference if anyone needs a similar solution.

 ![211374-constructionscript.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/8/178e363c1ca1537536960bf9d717cca05c1f3e9a.jpeg)
