How do I implement a hand-holding system?

If you are familiar with the game Ico, where the main character holds the hand of a girl while walking and running around.

How would one implement this in UE4? Assuming I have two models, with the same walking and running animation. I want to socket one hand from the second model to one hand from the first model (preferably left hand to right hand and vice versa). Do set ragdoll to the bones below the elbow? How would I get the second character to follow my steps kinematically? Even general advice would be very appreciated.

Hey boogerton!

You would do it by calculating avarage location of the 2 hand sockets and on both characters, IK different arms to the location.

You would probably have to do some extra math, since now the hands could detach, by limiting the movement to certain area around the other character.

Hope this helps, cheers!

For future readers,
Calculating the average location between 2 hand sockets and doing IK to reach this location would cause some oscillating problems, the way I did it is that I did IK on only one character and the other character would have an animation pose.
You can check my handholding template on the unreal marketplace if that’s what you want.
https://www.unrealengine.com/marketplace/en-US/product/handholding-template

Would have said exactly this had i seen this any time in the past 8 years:

Avarage = HORRIBLE idea.

One has to be the leader, the other has to be the follower.

Nothing prevents you from coding up a switch between who leads and who follows to create some interesting gameplay effects…

Ps:
Nice demo.

You should add some lerps and refinement between holding/not holding.
You can easily clean it up by using the newer animation recording features that let you record and scrub through what happened and where.
But essentially, if you just lerp the Ik alpha over 4 to 5 frames you will just never notice any glitch like behaviour…

1 Like