Course contentsShow
← Unreal Engine Game Development
Lesson 378 of 8805. Animation and Character RiggingFree lesson

Managing Multi-Character Montage Synchronization

Coordinate animations between multiple actors, such as grapples or finishers, using synchronized montages to ensure spatial alignment during execution.

In this lesson, you will learn how to align two independent characters perfectly during high-impact interactions like grapples or finishers by using a leader-follower synchronization approach.

The Challenge of Spatial Alignment

When two characters perform a choreographed interaction, they are separate Character blueprints. If you simply trigger a montage on both, small differences in their starting position or latency will result in "floating" hands or clipping meshes. To make the move look professional, we must treat one character as the "Master" (the initiator) and the other as the "Slave" (the recipient).

The Master-Follower Logic

The most reliable way to synchronize these animations is to use a Master Transform approach.

  1. The Initiator (Master): The attacker drives the movement. Use Root Motion on the attacker’s montage to ensure the physical movement of the character capsule is baked into the animation.
  2. The Recipient (Slave): The victim should not move themselves. Instead, you should attach the victim to the attacker’s socket or use SetActorLocationAndRotation to teleport the victim to a "Sweet Spot" socket on the attacker the moment the grapple begins.
  3. Synchronized Playback: You can use the Play Montage node on both actors. To keep them perfectly in sync, use a Montage_JumpToSection or a custom AnimNotify to ensure that if one actor experiences a slight delay, the other waits or snaps to the frame-match.

For example, to snap the victim into place at the start of a grapple, run this logic in your interaction Blueprint:

// Logic to align the victim to the attacker
FTransform SocketTransform = AttackerMesh->GetSocketTransform(FName("GrappleSocket"));
VictimActor->SetActorTransform(SocketTransform);
VictimActor->AttachToComponent(AttackerMesh, FAttachmentTransformRules::SnapToTargetNotIncludingScale, FName("GrappleSocket"));

By attaching the victim to a socket on the attacker, the victim effectively becomes part of the attacker’s skeleton, forcing them to move in perfect spatial harmony for the duration of the animation. Once the animation completes, use an AnimNotify to detach the victim and return them to normal movement.

Key Takeaway: To ensure perfect synchronization, force the recipient to teleport and attach to the initiator’s movement-driven skeleton at the exact moment the animation starts.