# Get Rotation on Axis this Frame

**URL:** <https://forums.unrealengine.com/t/get-rotation-on-axis-this-frame/373551>\
**Category:** Community & Industry Discussion\
**Tags:** relative, frame, rotation, axis, unreal-engine, local, question\
**Created:** [October 17, 2016, 8:30am UTC](https://forums.unrealengine.com/t/get-rotation-on-axis-this-frame/373551 "2016-10-17T08:30:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_d195f9ea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d195f9ea](https://forums.unrealengine.com/u/anonymous_user_d195f9ea)\
**Post date:** [October 17, 2016, 8:30am UTC](https://forums.unrealengine.com/t/get-rotation-on-axis-this-frame/373551/1 "2016-10-17T08:30:17Z")

</div>

Hi there,

I need to know, how much an Actor rotated this frame around a specific axis.  
Basicly I have a key which is rotatable in any direction and I need to know, how much he turned along his forward axis so that I can trigger events when he is turned quickly like you would do to unlock a door.

Thank you in advance,

---

<div class="post-metadata">

**Author:** ![Speckulous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Speckulous](https://forums.unrealengine.com/u/Speckulous)\
**Post date:** [October 17, 2016, 8:49am UTC](https://forums.unrealengine.com/t/get-rotation-on-axis-this-frame/373551/2 "2016-10-17T08:49:35Z")

</div>

Like this? Maybe you have to adjust the subtraction.

 ![111192-bildschirmfoto+vom+2016-10-17+10-46-41.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/9/c/89ce11d229c81f1b287119aae080ffa6de61449c.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d195f9ea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d195f9ea](https://forums.unrealengine.com/u/anonymous_user_d195f9ea)\
**Post date:** [October 17, 2016, 9:58am UTC](https://forums.unrealengine.com/t/get-rotation-on-axis-this-frame/373551/3 "2016-10-17T09:58:16Z")

</div>

Hmmm… I replaced the subtraction with a dot product to convert the distance to an actual angle. It almost works. Right now it’s tracking two axis though, but I need only one.^^ (When I connect the z node, it tracks exactly the two axes I don’t want to track)

Here my nodes:

 ![111202-rottest.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/2/8/a2822d607c06e0c54b5bf7f21a2a09b70c28449e.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_d195f9ea](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_d195f9ea](https://forums.unrealengine.com/u/anonymous_user_d195f9ea)\
**Post date:** [October 18, 2016, 8:00am UTC](https://forums.unrealengine.com/t/get-rotation-on-axis-this-frame/373551/4 "2016-10-18T08:00:30Z")

</div>

This was a hard one. I found a solution which seams to work in every direction.

 ![111367-rotsolution.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/8/1f8d938a8b34b10f3f7a25a66fd93bcdfd28aa67.jpeg)
