# Rotating an object at a point via Motion Controllers

**URL:** <https://forums.unrealengine.com/t/rotating-an-object-at-a-point-via-motion-controllers/398463>\
**Category:** XR Development\
**Tags:** Motion-Controller, unreal-engine, question, Blueprint\
**Created:** [August 9, 2017, 9:01am UTC](https://forums.unrealengine.com/t/rotating-an-object-at-a-point-via-motion-controllers/398463 "2017-08-09T09:01:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_74b7b709](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_74b7b709](https://forums.unrealengine.com/u/anonymous_user_74b7b709)\
**Post date:** [August 9, 2017, 9:01am UTC](https://forums.unrealengine.com/t/rotating-an-object-at-a-point-via-motion-controllers/398463/1 "2017-08-09T09:01:25Z")

</div>

Hi all,

I am attempting to create a blueprint script that will rotate a sphere around a point in any direction so that it’s rotation follows the motion controller that controls the rotation.

Here’s what I have, but what I’m seeing so far is that the sphere rotates wildly when set planet rotation first starts firing. It smooths out somewhat if the controller is moved to an arbitrary location away from the start point, but is still unpredictable. This event is being fired on tick, as long as a grip button on the controller is being held down. When the button is released, we reset StartCtrlPosition and no longer fire SetPlanetRotation until the button is pressed again.

 ![193369-screenshot1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/5/d353e69fed960981539a6cdd3e7cadb2c81b5b83.png)

 ![193370-screenshot2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/c/6/7c60257ed4207a15b65fed5983d85ab9e3c1d3aa.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_74b7b709](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_74b7b709](https://forums.unrealengine.com/u/anonymous_user_74b7b709)\
**Post date:** [August 10, 2017, 2:23am UTC](https://forums.unrealengine.com/t/rotating-an-object-at-a-point-via-motion-controllers/398463/2 "2017-08-10T02:23:25Z")

</div>

Here’s what I ended up with that works, for the most part. I needed to account for even the smallest movement of the controllers having potentially a huge impact on planet rotation. This graph is also very much cleaned up.

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

 ![204027-screenshotfixed2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/d/1/2d17d7d3594a3fe83e188491bbee1f67d8bef036.png)

---

<div class="post-metadata">

**Author:** ![EXCIR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@EXCIR](https://forums.unrealengine.com/u/EXCIR)\
**Post date:** [November 15, 2021, 6:06pm UTC](https://forums.unrealengine.com/t/rotating-an-object-at-a-point-via-motion-controllers/398463/3 "2021-11-15T18:06:08Z")

</div>

Hey, thanks for sharing  
I did the exact blueprint but something is wrong and can’t find out what.  
On the screenshotfixed2.png is that a Dot Product? (two vector input and one float output)  
And top of the Dot Product nod I mentioned, is that multiply? (two vector input and one vector output)  
Cheers
