Download

Convert rotation to translation

Hi everyone,

First of all I am a maya rigger, working in video games since two weeks. So I’m pretty new to Unreal Engine, sorry for potential misunderstandings.

I need to do some rigging in animation graph for characters, and I’m looking for a way to set up a elbow bone which will translate as the arm is bending (to keep elbow volume).
So I tried to use bone driven controller to “map” the forearm rotation (Y axis) on this elbow bone’s translate. It goes well at the first 90 degrees, but Unreal Engine is evaluating rotations in a very different way from Maya.

Y rotation goes : 0 >> 90 >> 0 >> -90 >> 0 (with X and Z axis flipping halfway)
instead of : 0 >> 90 >> 180 >> 270 >> 360 / 0
or even : 0 >> 90 >> 180 / -180 >> -90 >> 0 (like X and Z axis in UE4)

Because of that way of calculation, with bone driven controler, elbow bone’s translate increase until 90 degrees is reached, and then decrease…
So I thought about other ways, as vector operations for example, I would find the angle between the arm and the forearm with their vectors, and somehow find a way to convert this into translate for the elbow bone. But I don’t even know how to get bone informations as transforms or vectors. When I try using a node like “get socket transform”, I have that “target(self)” pin in which I don’t even know what to plug. I saw that I needed a “scene component object reference” for that but I don’t know what it is… I found a corresponding variable type but I have nothing to fill it, the scene component list is empty.

Anyway, so many questions in once, but my main question would be : how would you convert Y axis rotation into one axis translation in the anim graph to get that elbow bone setup works correctly ?

Thank you in advance for your time and have an excellent day !