Rotator between two Vectors

Hey there,

I’m interested in some Math, maybe you guys can help me out. I want to find a Rotator (Euler angles) between two vectors. They aren’t necessarily meant to be axis-aligned, so I can’t just use “Make Rot from”. Another reason why I don’t want to use built-in functions is because I’m interested in expanding this algorithm to 4D. That’s why I’m asking for some “low-level” mathematical help.

My approach right now is to find the rotation angles around single axes, or in other words rotating 2D projections of the 3D vectors. To achieve the angles, I use the difference of the atan2’s of the projection coordinates. Afterwards, I rotate the 3D vector around the three axes and the angles I found. This gives me weird results though, most likely because the single rotations affect each other when applied to the original vectors. Furthermore, the rotation order in UE4 isn’t documented at all so I don’t know which is the axis to rotate around first.

No, I don’t want to work with quaternions as they are hard enough to understand in 3D (and remember, I want to expand this algorithm to 4D). A solution without any matrix math is also much more welcome, if there is one at all.