MoveComponentTo Bug

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.

Hi ,

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

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

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?

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.

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.