Hand bone (IK) rotation to surface

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.

Any help appreciated. Thanks.


Update!

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.

Update 2!

Found the C++ functions! FRotationMatrix | Unreal Engine Documentation!

Hello PersnicketyGareth,
I saw your post on reddit, answerhub and here, and it looks like you’re the only one talking about this matter…
Basically i’m trying to achieve the same result as you (except for a ball to catch, I have an animation that I want to polish with ik to put the hand right where the ball is) but I can’t make it work. Would you mind sharing some screens ?

Also managed it !

Hello,
I managed it. Here are the 3 screenshots : Hands on surface details (Unreal engine 4) - Album on Imgur

I used directly the Impact normal and added 90degres to the X rotation and -90 to the Y rotation

Regards !

Do you have a tutorial on this??? I’ve looked at the 3 screenshots. (I’m an animator, so blueprints aren’t my specialty, hehe).