# How to rotate a vector with a vector in Niagara?

**URL:** <https://forums.unrealengine.com/t/how-to-rotate-a-vector-with-a-vector-in-niagara/511510>\
**Category:** FX\
**Tags:** unreal-engine, UE5-0, question\
**Created:** [April 1, 2022, 11:25am UTC](https://forums.unrealengine.com/t/how-to-rotate-a-vector-with-a-vector-in-niagara/511510 "2022-04-01T11:25:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [April 1, 2022, 11:25am UTC](https://forums.unrealengine.com/t/how-to-rotate-a-vector-with-a-vector-in-niagara/511510/1 "2022-04-01T11:25:06Z")

</div>

In a Niagara module I’m trying to rotate a vector to ‘stick’ with another vector. It’s simple in BP, it works like that:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/d/2/3d2f4cb9b217e54432172c03c450b4689a0168eb.png)

… But I can’t find a way to do that in Niagara.

---

<div class="post-metadata">

**Author:** ![Slavq](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Slavq](https://forums.unrealengine.com/u/Slavq)\
**Post date:** [April 1, 2022, 11:59am UTC](https://forums.unrealengine.com/t/how-to-rotate-a-vector-with-a-vector-in-niagara/511510/2 "2022-04-01T11:59:15Z")

</div>

**Update: It works for my problem, but I only need to rotate a perpendicular vector - for other vectors, this won’t work, since it will always produce a vector that is perpendicular to the vector B.**  
Just found a solution/workaround: I use the Project Vector On Plane function in Niagara. Inputs:  
Vector A as ‘Vector’ input  
Vector B as ‘Normal’ input

The result is a vector A that rotates with vector B. Does the trick in my case, but if there’s a better way, please share 🙂

---

<div class="post-metadata">

**Author:** ![Rumzie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Rumzie](https://forums.unrealengine.com/u/Rumzie)\
**Post date:** [April 1, 2022, 1:37pm UTC](https://forums.unrealengine.com/t/how-to-rotate-a-vector-with-a-vector-in-niagara/511510/3 "2022-04-01T13:37:10Z")

</div>

You will want to rotate with quaternions as much as possible. If you are familiar with angle axis quaternions are similar.

However, I’m unsure if there is a BP exposed/Niagara editor quaternion solution. Sorry I can’t be of more help, but hopefully it points you in the right direction.
