In this lesson, you will learn how to procedurally adjust character rig poses to ensure limbs align realistically when two characters interact, such as during a handshake or a combat grab.
Understanding Procedural Synchronization
When two characters interact, playing two separate, static animations often leads to "popping" or misalignment because minor variations in character height or movement speed disrupt the connection. To solve this, we use the Control Rig to override specific joint transforms in real-time, effectively "snapping" the hands or contact points together regardless of the base animation.
The core idea is to designate one character as the "Leader" and the other as the "Follower." We calculate the world-space location of the Leader’s interaction point (e.g., the palm) and use a Control Rig function to force the Follower’s hand bone to match that transform.
Implementing the Correction
In your Control Rig graph, you perform this adjustment using a sequence of nodes that calculate the target offset. By utilizing Inverse Kinematics (IK), you can drive the follower’s arm to reach the target, while keeping the shoulder pinned to the body.
Here is the logical flow for your Control Rig function:
- Get Interaction Target: Receive the transform of the target bone (from the other character) via an Animation Blueprint parameter.
- Transform to Local Space: Convert the world-space target into the component space of the Follower’s rig.
- IK Solve: Use an
IK Goalnode to influence the chain (e.g., Shoulder -> Elbow -> Hand).
// Logic inside Control Rig Graph
// 1. Calculate Target Transform relative to the character's skeletal root
// 2. Drive the 'Hand_IK_Goal' control to the target position
// 3. Enable 'Full Body IK' or 'Two Bone IK' to solve the chain
By adjusting the weights of these constraints, you can blend between the baked animation and the procedural correction. This ensures that the hand stays locked to the partner’s position even if they are slightly out of sync. This approach relies on your existing knowledge of Inverse Kinematics and Control Rig Functions to maintain a seamless connection between independent skeletons.
Key Takeaway: Procedural interaction is achieved by using Control Rig IK to override limb transforms, locking a follower’s contact point to a leader’s transform in real-time.