# MoveComponentTo Bug

**URL:** <https://forums.unrealengine.com/t/movecomponentto-bug/347416>\
**Category:** Blueprint\
**Tags:** unreal-engine, bug-report, UE4, Blueprint, question\
**Created:** [February 14, 2016, 8:37am UTC](https://forums.unrealengine.com/t/movecomponentto-bug/347416 "2016-02-14T08:37:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raildex](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raildex](https://forums.unrealengine.com/u/Raildex)\
**Post date:** [February 14, 2016, 8:37am UTC](https://forums.unrealengine.com/t/movecomponentto-bug/347416/1 "2016-02-14T08:37:51Z")

</div>

Hi.

If an axis goes from -180 to 180 or vice versa via MoveComponentTo, the Component rotates into it the “long” way, This is kind of annoying when using MoveComponentTo with a Ledge Climbing System.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [February 15, 2016, 8:23pm UTC](https://forums.unrealengine.com/t/movecomponentto-bug/347416/2 "2016-02-15T20:23:23Z")

</div>

Hi ,

This is caused by Gimbal Lock. You can read more on Gimbal Lock here:

> **[Gimbal lock](https://en.wikipedia.org/wiki/Gimbal_lock)**
>
> Gimbal lock is the loss of one degree of freedom in a three-dimensional, three-gimbal mechanism that occurs when the axes of two of the three gimbals are driven into a parallel configuration, "locking" the system into rotation in a degenerate two-dimensional space.
> The term gimbal-lock can be misleading in the sense that none of the individual gimbals are actually restrained. All three gimbals can still rotate freely about their respective axes of suspension. Nevertheless, because of the paralle...

To get around this, you will have to convert your rotators to quaternions, you can find more about Quaternions here:

> **[Quaternion](https://en.wikipedia.org/wiki/Quaternion)**
>
> In mathematics, the quaternion number system extends the complex numbers. Quaternions were first described by the Irish mathematician William Rowan Hamilton in 1843 and applied to mechanics in three-dimensional space. Hamilton defined a quaternion as the quotient of two directed lines in a three-dimensional space, or, equivalently, as the quotient of two vectors. Multiplication of quaternions is noncommutative.
> Quaternions are generally represented in the form
> where a, b, c, and d are real num...

---

<div class="post-metadata">

**Author:** ![Raildex](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raildex](https://forums.unrealengine.com/u/Raildex)\
**Post date:** [February 15, 2016, 9:28pm UTC](https://forums.unrealengine.com/t/movecomponentto-bug/347416/3 "2016-02-15T21:28:24Z")

</div>

Its not a gimbal lock. I rotate yaw only. Pitch and Roll are untouched.  
And why does have a user need a work around for a problem the engine is causing?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b9532c9a](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b9532c9a](https://forums.unrealengine.com/u/anonymous_user_b9532c9a)\
**Post date:** [February 16, 2016, 7:03pm UTC](https://forums.unrealengine.com/t/movecomponentto-bug/347416/4 "2016-02-16T19:03:57Z")

</div>

Unfortunately this is not a workaround or a bug but expected behavior from rotators and how to best avoid that behavior. The behavior seen is technically not correct, however the calculations for rotations are done at a deep engine level. To alter them would require fundamental shifts in the entire engine, which is not something that is going to be done any time in the near future. Sadly, this means that rotators to quaternions is the most viable path to clean rotations in UE4.

---

<div class="post-metadata">

**Author:** ![Raildex](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Raildex](https://forums.unrealengine.com/u/Raildex)\
**Post date:** [February 18, 2016, 4:09pm UTC](https://forums.unrealengine.com/t/movecomponentto-bug/347416/5 "2016-02-18T16:09:09Z")

</div>

Not sure about that “fundamental shifts”. It’s just happening in MoveComponentTo for me.

Edit:

I got a workaround with Lerp(Rotator)  
I wonder why MoveComponentTo doesn’t work, but Lerp does.
