# Relative rotation inside Pawn

**URL:** <https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435>\
**Category:** Community & Industry Discussion\
**Tags:** rotation-direction, unreal-engine, Components, question\
**Created:** [May 5, 2019, 5:09pm UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435 "2019-05-05T17:09:28Z")\
**Posts on this page:** 14\
**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:** [May 5, 2019, 5:09pm UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/1 "2019-05-05T17:09:28Z")

</div>

Hi,  
I Have two components inside Pawn and want to rotate them in different axis. But when I set Relative rotation they both rotates in the same direction. Thanks for help.

---

<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:** [May 18, 2019, 5:49pm UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/2 "2019-05-18T17:49:23Z")

</div>

I want to rotate tower of a tank relative to it’s rotation inside Actor Blueprint. Like in video. But it flips to actor rotation and not rotation relative to actor . Problem is showen in 0.13 sec in video:

[![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/a/2/4a2b1b1840f686787fbc4122fa2116932b1bdabe.jpeg "RelativeRotationProblem") ](https://www.youtube.com/watch?v=A_pMENVPV7Q)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 18, 2019, 5:58pm UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/3 "2019-05-18T17:58:06Z")

</div>

Post a pic of the blueprint that’s doing the rotation. It will be then possible to help you. Right now, we can only say use RelativeRotation…

All I can see is a shaky footage of a (cool looking!) vehicle doing weird stuff. The turret seems to be rotating but it looks like physics collision is in the way.

---

<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:** [May 18, 2019, 6:11pm UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/4 "2019-05-18T18:11:30Z")

</div>

Here are pics

---

<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:** [May 18, 2019, 6:18pm UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/5 "2019-05-18T18:18:35Z")

</div>

Collisions are no problem because they are turned off.Problem is in set relative rotation node. I tryied to Add local Rotation but its hard to control rotation of the tower.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 18, 2019, 8:55pm UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/6 "2019-05-18T20:55:17Z")

</div>

> Problem is in set  
> relative rotation node. I tryied to  
> Add local Rotation but its hard to  
> control rotation of the tower.

At a glance, the Inverse Transform in pic 2 looks odd. I’d try it like this:

 ![277282-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/b/0/3b0a8d292dfb1d257903c488934d9f079b75f29a.png)

Untested but _should_ work fine for a component with something relative attached to it. Like a tank with a relative turret.

edit: or like this:

 ![277283-cap2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/6/f/96fa6299ea4c905d50a4914d91b008333606de1b.png)

---

<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:** [May 19, 2019, 6:54am UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/7 "2019-05-19T06:54:50Z")

</div>

Sorry, not working ☹

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 19, 2019, 7:32am UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/8 "2019-05-19T07:32:32Z")

</div>

I disagree, it’s working well:

 ![277307-clearer.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/3/1b3826393572b9da8f77350dc9ffa19320e7c743.jpeg)

The arrow attached to a mesh:

edit, better vid and pic without double relativity:

[![Image from Gyazo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/d/1/4d15fc6e2d35159b739a0a332d6e6806aee24b41.gif)](https://gyazo.com/3e131c6ff9a40ee80879be4fcf65cbe3)

---

<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:** [May 19, 2019, 9:33am UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/9 "2019-05-19T09:33:12Z")

</div>

Yes, for Yours example work fine. But in my video i have two towers one Is relative to parent in 0 angle but second is in 90 angle. And I want to rotate them in relative yaw only. Video shows how left tower flipes when actor is possessed.  
Thanks for answer:)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 19, 2019, 9:45am UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/10 "2019-05-19T09:45:57Z")

</div>

I disagree again:

 ![277310-untitled.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/7/a/17a24a51c9d8e24e508468fe8a05ca6a4250424f.png)

Here’s a cube relative to car mesh, with an arrow relative to the cube. It’s a matter of feeding the inverse transform correct data.

As you can see, everything here is at an angle, the car on a slope, the cube is rotated, the arrow points to the side.

---

<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:** [May 19, 2019, 10:01am UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/11 "2019-05-19T10:01:08Z")

</div>

But how to restrict tower to move only in relative yaw rotation and stay relative to actor because I don’t want to move it in roll and pitch.

---

<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:** [May 19, 2019, 10:20am UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/12 "2019-05-19T10:20:12Z")

</div>

To show it less complicated I posted and image. Violet is rotation restrictions blue z axis red x axis green y axis

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [May 19, 2019, 10:22am UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/13 "2019-05-19T10:22:56Z")

</div>

I do not see an image and I’m no longer sure I follow what you need but you can exclude rotational components from calculations:

 ![277318-capture.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/c/b/5cb7afd4ec74cf944ce592b469c1ffc9d5531b6b.png)

---

<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:** [May 19, 2019, 10:37am UTC](https://forums.unrealengine.com/t/relative-rotation-inside-pawn/448435/14 "2019-05-19T10:37:53Z")

</div>

![277326-rotation-problem-low.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/3/6/636df9023c695aa0b10f220e82d7fe60120ff9e2.jpeg)

Here is the image
