heroBackground

Motion Matching For NPCs

3 WeeksUnreal EngineAnimationC++ ProgrammingMotion Matching

This is an example of transforming Unreals Motion Matching Sample for players into a system for NPCs

Procedural Aim Offset

This demo shows the character using motion matching for the lower body while the upper body blends with a procedural aim offset

I used a procedural Aim Offset for increased accuracy in combination with motion matching

Left Hand IK

Procedural Hand IK to lock the characters left hand to the weapon grip to do procedural recoil

I apply IK after motion warping to ensure the location is always accurate in world space, accounting for blending and any offsets.

To stay Fast Path–compatible, I only calculate the left-hand offset from the right, avoiding constant weapon position updates.

I used a control rig to place the characters hand exactly onto the weapon