# Rotate Object Problem (Roll,Pitch,Yaw)

**URL:** <https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988>\
**Category:** Community & Industry Discussion\
**Tags:** rotation, sphere, player-rotation, topdown, unreal-engine, question, yaw\
**Created:** [March 28, 2020, 2:24pm UTC](https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988 "2020-03-28T14:24:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![U.Dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/u.dev/32/474384_2.png) [@U.Dev](https://forums.unrealengine.com/u/U.Dev)\
**Post date:** [March 28, 2020, 2:24pm UTC](https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988/1 "2020-03-28T14:24:20Z")

</div>

I Bumped into a problem and i’m trying to fix it for a days now maybe a week and i lost all my power and i though you guys can help me, my problem maybe sounds bit complicated but i will try to explain it with photos and text.  
So let me explain :  
I have Top-Down Character which is rotating towards (Find Look At Rotation) \> Mouse location and it’s works fine, but the thing is i want to make him rotate on a Spherical Object, I want him to follow the mouse location like he did in plane, but the thing on sphere is that rotation change the X / Y / Z together, all i need is my character to stay up but to rotate only YAW no matter where on the sphere location he is.

 ![298640-z-360.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/7/a/f7a0a87ddf647a1d4e09a178b87139f1d37fcd6c.png)

/\ On this picture my character is rotated X = 0 / Y = 128 / Z = 0 /\

 ![298651-z-random.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/a/8/6a85b725000a7953d8d03268295ff32fea70d043.png)

/\ On this picture my character is rotated X = 127 / Y = 44 / Z = 203 /\

If you have any missunderstanding ask me i will explain more, Thanks in Advance - Cheers

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [March 28, 2020, 4:36pm UTC](https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988/2 "2020-03-28T16:36:43Z")

</div>

Hi,

(1) do you want the location of the character to change, so do you want him to move on the sphere?

(2) Or do you want him to stay at one location on the sphere (so not move on the sphere) and then only to rotate around local yaw?

(3) If you want him to move on the sphere should he be able to move freely along the sphere surface, or do you want to limit him to a certain pitch location of the sphere (so only walk along a circle of the sphere surface)?

---

<div class="post-metadata">

**Author:** ![U.Dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/u.dev/32/474384_2.png) [@U.Dev](https://forums.unrealengine.com/u/U.Dev)\
**Post date:** [March 29, 2020, 1:17pm UTC](https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988/3 "2020-03-29T13:17:31Z")

</div>

Neither of those 3, i already have TopDown Movement System Build on with ADS pointing to the Mouse Cursor Location, he works very well on the Plane only Z gravity - Standard for UE4, but from the other side i make him move on sphere but i can’t make him ADS (Aim Down Sight) to the mouse cursor Location because it’s on a sphere, sphere does not affect only Z as a gravity pull everything on a center,  
\*\*I will put 2 pictures right now, what the arrows does is simple Blue Arrow indicate Up, Red Arrow rotate 360 Only Z from 0 \> 360 via timeline X and Y are = 0 (First picture will be on a Plane where does the rotation works well) and the second picture will be on sphere) \*\*

 ![298715-1-plane.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/5/e752a473fa49be9c0681131695e23d1cebf2b49c.png)

 ![298716-1-sphere.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/6/bb6323742ad7fadb7c8d009be04323092b49ccd3.png)

---

<div class="post-metadata">

**Author:** ![chrudimer](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chrudimer/32/918651_2.png) [@chrudimer](https://forums.unrealengine.com/u/chrudimer)\
**Post date:** [March 29, 2020, 9:54pm UTC](https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988/4 "2020-03-29T21:54:45Z")

</div>

Ok as far as I understands it now,

the character stands on any location on the sphere. And then you want him to rotate to the mouse cursor but the character should only rotate around local yaw (local yaw on a plane would just be the z-axis and on a sphere it would be the vector pointing from the center of the sphere to the character).

Did I get it correct now, or still wrong?

---

<div class="post-metadata">

**Author:** ![U.Dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/u.dev/32/474384_2.png) [@U.Dev](https://forums.unrealengine.com/u/U.Dev)\
**Post date:** [March 30, 2020, 12:55pm UTC](https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988/5 "2020-03-30T12:55:05Z")

</div>

Exactly ! That’s all i want, i’m strugling more than a week now i can’t get it work…

---

<div class="post-metadata">

**Author:** ![U.Dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/u.dev/32/474384_2.png) [@U.Dev](https://forums.unrealengine.com/u/U.Dev)\
**Post date:** [March 30, 2020, 12:59pm UTC](https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988/6 "2020-03-30T12:59:40Z")

</div>

EDIT : i have every else already set up Character movement, \*\*Sphere Gravity \> ( [Directional & Planet Gravity in Code Plugins - UE Marketplace](https://www.unrealengine.com/marketplace/en-US/product/directional-planet-gravity) ) all i need is character to rotate towards mouse cursor on sphere only Yaw local. Thanks so much in advance for trying to help.

---

<div class="post-metadata">

**Author:** ![U.Dev](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/u.dev/32/474384_2.png) [@U.Dev](https://forums.unrealengine.com/u/U.Dev)\
**Post date:** [March 30, 2020, 2:36pm UTC](https://forums.unrealengine.com/t/rotate-object-problem-roll-pitch-yaw/462988/7 "2020-03-30T14:36:31Z")

</div>

chrudimer Thank you for trying to help me i apriciate it so much, but i finally fix it by myself ! my mistake was i was always trying to get it work with World Location all i was need to do is get all the Local Locations and Rotations…

This is the answer for Sphere/Planetary Player Rotate towards mouse.

 ![298781-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/9/9/d9963c2cecf0be62f0ddf21d4e30778581fbe720.png)

 ![298782-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/c/05c739789489181a55a01208b76ede4f33351eee.png)

 ![298783-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/9/b/b9b6213eac0795ee8c6bc5c3a69e729b9d2bbde6.png)
