Abstract
Traditional character animation techniques often struggle to handle arbitrary situations, leading to a growing trend of dynamically selecting motion-captured animations based on predefined features. While Motion Matching has proven effective for locomotion by aligning to target trajectories, animating environment interactions and crowd behaviors remains challenging due to the need to consider surrounding elements. Existing approaches often involve manual setup or lack the naturalism of motion capture. Furthermore, in crowd animation, body animation is frequently treated as a separate process from trajectory planning, leading to inconsistencies between body pose and root motion. To address these limitations, we present Environment-aware Motion Matching, a novel real-time system for full-body character animation that dynamically adapts to obstacles and other agents, emphasizing the bidirectional relationship between pose and trajectory. In a preprocessing step, we extract shape, pose, and trajectory features from a motion capture database. At runtime, we perform an efficient search that matches user input and current pose while penalizing collisions with a dynamic environment. Our method allows characters to naturally adjust their pose and trajectory to navigate crowded scenes.
Video
Method Overview

Our system operates in two distinct stages: a preprocessing phase and a real-time controller. In preprocessing, we extract pose, trajectory, and environment features from motion capture data. At runtime, the real-time controller constructs a query vector from user input and the current character pose, which is compared against query features. Simultaneously, environment features guide the search by computing dynamic obstacle penalizations. Pose and trajectory features are defined similarly to existing Motion Matching methods, while our novel environment features enable environment-aware pose search. Query features are compared to target values, whereas environment features are used to compute penalization factors based on dynamic scene analysis.
Results
Below are several video demonstrations showcasing our system in different scenarios. Each video highlights a unique aspect of environment-aware motion matching, including navigation in narrow corridors, zigzag movement, and multi-character interactions.
Narrow Corridor Navigation
Character navigating a progressively narrowing corridor. As the corridor narrows to 0.35 meters, the character reduces speed and transitions to side-stepping. When the corridor becomes wider again, the system switches back to a running animation. This demonstrates the system's ability to adapt body pose and speed to tight environmental constraints.
Zigzag Path Following
Character traversing a corridor with zigzag cone obstacles. Despite receiving only a continuous forward input, our system enables the character to dynamically zigzag, maintain velocity, and transition to side-stepping through narrower sections or partially closed doorways. This illustrates the generation of complex trajectories from simple user commands due to environment awareness.
Multi-Character Corridor Interaction
Multi-character interaction in corridors of varying widths. Blue corridor (1.55m width): Characters walk with minimal body adjustment. Green corridor (1.20m width): Characters exhibit body turns to pass each other while walking. Red corridor (0.95m width): Characters carefully avoid each other. Two examples of the red corridor are provided to demonstrate the diversity of poses generated by our method.
Adapting to Moving Cubes
Character adapting to two moving cubes with no user input. The character, initially stationary, automatically takes a few steps forward to avoid colliding with the approaching cubes. This demonstrates the system's real-time adaptation to dynamic obstacles without user intervention.
Avoiding a Moving Car
Character avoiding a moving car despite conflicting user input. The user inputs a forward movement (towards the car). However, as the car moves backward, the system makes the character naturally transition to a backward jogging animation, adapting pose and root motion to avoid collision.
Agent Interaction: Different Speeds
Interaction between agents with different speeds. (1) A running character (red shirt) approaches a walking character, leading to a noticeable torso rotation for avoidance. (2) Both characters are walking, resulting in more subtle torso rotations for collision avoidance.
Jumping Over Obstacles
Character interacting with vertical obstacles using height features. The character jumps over a fence to maintain its target trajectory, demonstrating the system's ability to select appropriate vertical movements to overcome obstacles.
Crouching Under Ceilings
Character adapting to varying ceiling heights. The character progressively crouches to pass under a semitransparent red ceiling. When faced with a significantly lower ceiling, the character naturally transitions to a lying-down pose to traverse the obstacle, showcasing vertical adaptation.
Prop Weapon Adaptation
Character adapting pose while holding a prop weapon. The character lowers the weapon as it navigates between columns to successfully fit through the narrow gaps.
Carrying a Large Box
Character carrying a large box. The character raises the box above its head to pass between columns.
Locomotion Style Adaptation
Example of a different locomotion style. A character typically walking with elbows raised adopts a more compact quiet pose when near other agents to fit through spaces, demonstrating adaptation to social or spatial constraints based on animation style.
BibTeX
@article{2025:ponton:emm,
author = {Ponton, Jose Luis and Andrews, Sheldon and Andujar, Carlos and Pelechano, Nuria},
title = {Environment-aware Motion Matching},
year = {2025},
publisher = {Association for Computing Machinery},
booktitle = {SIGGRAPH Asia 2025},
address = {New York, NY, USA},
issn = {0730-0301},
doi = {10.1145/3763334},
journal = {ACM Trans. Graph.},
}