I am trying to make a character put their hands on a nearby surface.
I have done the IK, so the hand actually moves to the surface. I also have the surface normal vector of the surface at the point where I want the hand to be going to.
How do I convert this surface normal into the correct Rotator for the hand?
I tried using RotationFromXVector, Rotation from X, Y and Z. None of them will line up to make the palm face the surface.
Managed to get the angle I want using “Make Rot from XY” by putting the surface normal into the Y axis, and setting the X-axis as default.
I wish these “make rot from XY” functions were available in C++. If anyone knows how to get them, let me know.