# How To get forward vector from rotating component ?

**URL:** <https://forums.unrealengine.com/t/how-to-get-forward-vector-from-rotating-component/491129>\
**Category:** Community & Industry Discussion\
**Tags:** rotation, unreal-engine, local, question\
**Created:** [November 20, 2021, 12:33pm UTC](https://forums.unrealengine.com/t/how-to-get-forward-vector-from-rotating-component/491129 "2021-11-20T12:33:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mateusz88](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mateusz88](https://forums.unrealengine.com/u/Mateusz88)\
**Post date:** [November 20, 2021, 12:33pm UTC](https://forums.unrealengine.com/t/how-to-get-forward-vector-from-rotating-component/491129/1 "2021-11-20T12:33:25Z")

</div>

Hi, like in above. I have a rotating wheel and I need forward vector from it. When I plug it from world rotation forward vector spinns whit it but I need local rotation. I mean that vector will be always in front of wheel. Thanks in advance…

---

<div class="post-metadata">

**Author:** ![Chasetopher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Chasetopher](https://forums.unrealengine.com/u/Chasetopher)\
**Post date:** [November 20, 2021, 1:06pm UTC](https://forums.unrealengine.com/t/how-to-get-forward-vector-from-rotating-component/491129/2 "2021-11-20T13:06:11Z")

</div>

Depending on what you’re trying to do and how you’re rotating the wheel you could either “Get Actor Forward Vector” or get the relative rotation and get the forward vector from that. If you upload some screenshots I may be able to help you a bit more

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [November 20, 2021, 2:29pm UTC](https://forums.unrealengine.com/t/how-to-get-forward-vector-from-rotating-component/491129/3 "2021-11-20T14:29:30Z")

</div>

If this is your wheel component

![352601-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/d/0/ed004e6c8f174b393ab328bd4f356c10b6719dbd.jpeg)

then it would be rotating around Y. But, as you know, X is going with it.

One solution is to include a scene component. It has no ‘content’, but it does have a pivot point:

Here, I put the scene in, without the mesh selected, and then I dragged the wheel under the scene:

 ![352602-screenshot-2.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/6/5a6a4f5a32d1a7c9d4b7da1b8605200d8617d218.jpeg)

Now, I can rotate the wheel without the scene rotating. If I want to steer, I need to rotate the scene from side to side.

---

<div class="post-metadata">

**Author:** ![Tuerer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tuerer/32/1008648_2.png) [@Tuerer](https://forums.unrealengine.com/u/Tuerer)\
**Post date:** [November 20, 2021, 3:02pm UTC](https://forums.unrealengine.com/t/how-to-get-forward-vector-from-rotating-component/491129/4 "2021-11-20T15:02:41Z")

</div>

I’d say just take the wheel RightVector and get the Cross product with Vector(0,0,1). It will always return a forward vector regardless the wheel rotation.

---

<div class="post-metadata">

**Author:** ![Mateusz88](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Mateusz88](https://forums.unrealengine.com/u/Mateusz88)\
**Post date:** [November 20, 2021, 4:27pm UTC](https://forums.unrealengine.com/t/how-to-get-forward-vector-from-rotating-component/491129/5 "2021-11-20T16:27:19Z")

</div>

Works as You said but instead of vector(0,0,1) I’ve plugged up vector of my actor. And everything work like a charm. Thanks
