PROTIP: Use Euler Transform in Your Control Rig's IK Controls

UPDATE: In Unreal Engine 5’s Control Rig, Control Type (now named Value Type) is set to Euler Transform by default, and the older Transform type has been since omitted. If you’re using UE5, you don’t have to worry about this.


When you create animations in-engine using Control Rig (which is awesome and a bit overpowered IMO), you may, sooner or later, encounter the recurring problem of gimbal locking. This is a side effect of the Rotator struct where value of an axis that reached beyond 180° will snap to -180°. It’s apparent when you’re trying to animate IK controls in root space, the limb will unnaturally twist around instead of taking the shortest path.

To mitigate this problem, usually you’d right click in an object’s Rotation property in Sequencer, go to Properties, and enable Use Quaternion Interpolation, but there’s another problem - specific to Control Rig, the Rotation value for a control is not treated as usual Rotation struct, but straight up as 3 float vars instead. So the option to use quaternion based interpolation doesn’t exist.

Or, is it?

After looking into much further, I found out that Control RIg itself actually used quaternion for rotation, as opposed to Rotation struct. But why does it still snapping? Turns out, to get the Sequncer to treat the rotation as quaternion, you have to set the Control Type into Euler Transform. This is set to Transform by default, so users can miss this.

Hopefully this protip can save your hair from getting split when working with Control Rig. :face_with_hand_over_mouth:


P.S.: If your control unintentionally rotates full rotation even with Euler Transform, make sure the rotator values in the sequencer doesn’t add/subtract by (multiply of) 360° by the next keyframe. Therefore, the direction on where you rotate it matters now.

11 Likes

Thanks for sharing!

Thanks a lot for the tip!

I am having this same problem. (see a video of my problem)

I tried following this explanation, which I assume means changing the control type of the control rig handle in the control rig skeleton config… but it didn’t change the behavior at all for me. Did I misunderstand?

I tried following this explanation, which I assume means changing the control type of the control rig handle in the control rig skeleton config… but it didn’t change the behavior at all for me. Did I misunderstand?

Check the curves, and make sure it isn’t bouncing around. Chances are that you get the rotation in place, but somehow the angle numbers are largely difference from the previous keyframe.

This did not work for me and when I changed my controllers from Transform to Euler Transform they moved and rotated themselves. I disconnected the execute and even unparented them, same deal, so I had to figure things out… I had to copy the bone transforms then paste global transform back into my control then set to closest bone again to fix it. Some glitches here and there when going back to the sequencer but a restart of UE4 seemed to fix those.

Annoyances:
You have to set each Controller one by one to the Transform Euler
It may move, you need to get its position back
Note: Keep the execute disconnected while fixing things to avoid other annoyances.

To fix this in the newest version, right click on your control inside the Control Rig, and then click on Set Offset Transform From Current, this will set your location and rotation in your Current transform to 0. You will have to replace the control rig for the changes to take effect, it will also probably mess the animation your already did, but it’s the only solution I found so far.

Thank you! <3

how can you place text in controller like that?

Looking for people using control rig in a more advanced capacity to help me with a rotation issue. Pretty much any rotation that goes in a 360 degree turn flips over on its head. Has anyone found a solution? I’ve read this forum post about gimbal lock and all of my controls are using Euler Transform (UE5 Default now) But I still cant do a smooth 360 degree rotation for spins or twirls.

Usually it’s because the rotation angle went full rotation more than once, make sure the value isn’t crazy high/low on the next frame.

1 Like

Just me, or did this solve nothing?

Most likely the former, but UE5 has Euler Transform by default anyway.