Motion Matching
Set up Motion Matching with Pose Search. Unreal Engine 5 command reference with parameters and examples.
Set up Motion Matching with Pose Search. Unreal Engine 5 command reference with parameters and examples.
13 commands. Each shows its parameters and an example, and has a copyable deep link, so you (or an AI agent) can jump straight to one.
get_pose_search_assetRead a Pose Search Schema (skeletons, channels) or Database (settings, entries)
A schema: sample rate, cardinality, skeletons (skeleton, mirror data table, role) and channels by index with their fields. A database: its settings (Schema, cost biases, tags, search mode...) and entries by index with asset, kind, enabled, mirror option, sampling range and whether the asset's skeleton fits the schema.
| Parameter | Type | Required | Description |
|---|---|---|---|
| asset_path | string | Yes | Pose Search Schema or Database path |
| filter | string | No | Substring filter on a database entry's asset path |
| max_results | int | No | Max database entries to return (0 = all); reports truncated |
cfa get_pose_search_asset /Game/MM/PSS_Locomotion
cfa get_pose_search_asset /Game/MM/PSD_Locomotion --filter Jogadd_pose_search_channelAdd a feature channel to a Pose Search Schema (Pose, Trajectory, Velocity...), or Epic's default pair
--type is a channel class from this engine's reflection: Pose, Trajectory, Velocity, Position, Heading, Phase, Curve, Group, Padding... (an unknown name lists the real ones), or default for the Trajectory + Pose pair the editor puts in a new schema. --properties sets the channel's fields by reflection, e.g. {"Weight":2}. Undoable.
| Parameter | Type | Required | Description |
|---|---|---|---|
| schema_path | string | Yes | Pose Search Schema path |
| type | string | Yes | Channel type (Pose, Trajectory, Velocity...) or default |
| properties | json | No | The channel's fields as JSON |
cfa add_pose_search_channel --schema-path /Game/MM/PSS_Locomotion --type default
cfa add_pose_search_channel --schema-path /Game/MM/PSS_Locomotion --type Velocity --properties '{"Bone":{"BoneName":"hand_r"},"Weight":0.5}'set_pose_search_channelChange a Pose Search Schema channel's fields by index (Weight, SampledBones, Samples...)
| Parameter | Type | Required | Description |
|---|---|---|---|
| schema_path | string | Yes | Pose Search Schema path |
| index | int | Yes | Channel index from get_pose_search_asset |
| properties | json | Yes | The fields to change as JSON |
cfa set_pose_search_channel --schema-path /Game/MM/PSS_Locomotion --index 0 --properties '{"Weight":5}'remove_pose_search_channelRemove a channel from a Pose Search Schema by index
| Parameter | Type | Required | Description |
|---|---|---|---|
| schema_path | string | Yes | Pose Search Schema path |
| index | int | Yes | Channel index from get_pose_search_asset |
cfa remove_pose_search_channel --schema-path /Game/MM/PSS_Locomotion --index 2set_pose_search_skeletonAdd or update a Pose Search Schema skeleton by role, with its Mirror Data Table
Plain animations use the default role (leave --role out). Mirrored entries need a Mirror Data Table on every schema skeleton, or the index build fails. --mirror-data-table none clears it.
| Parameter | Type | Required | Description |
|---|---|---|---|
| schema_path | string | Yes | Pose Search Schema path |
| skeleton | string | Yes | Skeleton asset path |
| mirror_data_table | string | No | Mirror Data Table path, or none to clear; leave out to keep |
| role | string | No | Role name; leave out for the default role |
cfa set_pose_search_skeleton --schema-path /Game/MM/PSS_Locomotion --skeleton /Game/Characters/Mannequins/Meshes/SK_Mannequin --mirror-data-table /Game/MM/MDT_Mannequinadd_pose_search_animationsAdd animations to a Pose Search Database (sequences, blend spaces, composites, montages)
Done the way the database editor adds them (Modify, add, PostEditChange), so it is undoable. --properties sets entry fields on each added entry by reflection: bEnabled, MirrorOption (UnmirroredOnly, MirroredOnly, UnmirroredAndMirrored), SamplingRange ({"Min":0,"Max":0} is the whole asset), and on 5.7+ the blend space sampling fields. An asset already in the database is skipped and named.
| Parameter | Type | Required | Description |
|---|---|---|---|
| database_path | string | Yes | Pose Search Database path |
| assets | stringlist | Yes | Animation asset paths |
| properties | json | No | Entry fields applied to each added entry, as JSON |
cfa add_pose_search_animations --database-path /Game/MM/PSD_Locomotion --assets /Game/Anims/MF_Jog_Fwd,/Game/Anims/MF_Jog_Bwd --properties '{"MirrorOption":"UnmirroredAndMirrored"}'set_pose_search_animationChange one Pose Search Database entry by index or asset (enabled, mirror option, sampling range...)
| Parameter | Type | Required | Description |
|---|---|---|---|
| database_path | string | Yes | Pose Search Database path |
| index | int | No | Entry index from get_pose_search_asset |
| asset | string | No | The entry's animation asset path (instead of index) |
| properties | json | Yes | Entry fields to change, as JSON |
cfa set_pose_search_animation --database-path /Game/MM/PSD_Locomotion --asset /Game/Anims/MF_Jog_Fwd --properties '{"bEnabled":false}'remove_pose_search_animationsRemove Pose Search Database entries by asset or index
| Parameter | Type | Required | Description |
|---|---|---|---|
| database_path | string | Yes | Pose Search Database path |
| assets | stringlist | No | Animation asset paths whose entries to remove |
| indices | json | No | Entry indices to remove, e.g. [0,3] |
cfa remove_pose_search_animations --database-path /Game/MM/PSD_Locomotion --assets /Game/Anims/MF_Jog_Fwdbuild_pose_search_indexBuild a Pose Search Database's search index and wait; returns the engine's own errors and warnings
Uses the same request the cooker makes, then waits. A failed build is an error whose text is the engine's LogPoseSearch message (for example a schema with no channels or a mirrored entry with no Mirror Data Table).
| Parameter | Type | Required | Description |
|---|---|---|---|
| database_path | string | Yes | Pose Search Database path |
| timeout_seconds | int | No | Seconds to wait (1-570) |
cfa build_pose_search_index --database-path /Game/MM/PSD_Locomotionvalidate_pose_search_databaseVerdict for a Pose Search Database: schema, channels, skeletons, mirror tables, assets, then the index build
Returns verdict = pass | pass_with_warnings | fail plus findings. Each rule is one the index build applies. Errors: no_schema, schema_no_channels, schema_no_skeleton, negative_channel_weight, mirror_table_no_skeleton, mirror_table_missing (a mirrored entry with a schema skeleton that has no Mirror Data Table), asset_no_skeleton, index_build_failed (the engine's own message). Warnings: entry_no_asset, skeleton_incompatible (the engine leaves the asset out), blend_space_sync_phases, no_enabled_entries, index_build_unfinished. --build-index=false skips the build.
| Parameter | Type | Required | Description |
|---|---|---|---|
| database_path | string | Yes | Pose Search Database path |
| build_index | bool | No | Also build the index and report a failed build |
| filter | string | No | Substring filter on the finding code, target or message |
| max_results | int | No | Max findings to return (0 = all); reports truncated |
cfa validate_pose_search_database /Game/MM/PSD_Locomotionget_motion_matching_stateWhat a running character's Motion Matching plays now: animation, time, cost, play rate, mirror, database, speed
Needs a running Play In Editor session. Finds every Motion Matching node in the actor's running anim instances (main, linked layers, post process) and reads its live MotionMatchingState by reflection: the picked animation and time, whether the search continued the current pose, the wanted play rate, mirror and loop, the database it came from and the search cost (lower is a closer match). Also the node's Settings fields, the Pose History nodes (and whether they generate a trajectory) and the character's speed and acceleration. A node with no pick says why it may be empty. For behaviour over time use sample_motion_matching; for the engine's own on-screen debug, see the Motion Matching guide in the skill.
| Parameter | Type | Required | Description |
|---|---|---|---|
| actor | string | Yes | Running actor name, from list_runtime_actors --spawned-only=false |
| world | string | No | Play world: server (default), client1... or instance:N |
cfa get_motion_matching_state --actor BP_Hero_C_0sample_motion_matchingRecord Motion Matching over time, optionally while pressing keys: picks, pose jumps, cost and speed per step, with a verdict
Needs a running Play In Editor session. Records the actor's Motion Matching node every frame for --seconds, or while it presses --steps (the same steps as simulate_input, sent to the local player). Returns, per step (or for the whole run), the poses picked with their share of frames, pose jumps, the search cost range, the play rate range, average and top speed and frames with no pick; a timeline of which pose played when; and verdict = pass | pass_with_warnings | fail with findings. Errors: no_search_result (the node picked nothing on most frames: no database, an empty Database pin, still indexing, or a node the graph never reaches), no_pose_history. Warnings: pose_flicker (poses held under 0.25 s between others), frequent_pose_jumps (over 4 a second), input_no_effect (keys held and the pawn did not move), same_pose_at_all_speeds, keys_went_elsewhere. One recording runs per actor; the CLI waits for it.
| Parameter | Type | Required | Description |
|---|---|---|---|
| actor | string | Yes | Running actor name, from list_runtime_actors --spawned-only=false |
| steps | json | No | JSON array of steps, each {"keys":[...],"seconds":N}: key names as Unreal spells them (W, A, S, D, SpaceBar, LeftShift, LeftControl, E, LeftMouseButton), keys in one step are held together, an axis key takes a value ({"key":"MouseX","value":4} per frame, {"key":"Gamepad_LeftY","value":1} held), an empty keys array waits. Up to 64 steps, 60 s each, 120 s in all |
| seconds | float | No | Seconds to record when no steps are given (0.2 to 60) |
| node | string | No | Motion Matching node name when the actor runs several (from get_motion_matching_state) |
| world | string | No | Play world: server (default), client1... or instance:N |
| wait | bool | No | Wait until it finishes and return the result (false = return at once; repeat the same call to collect it) |
| wait_timeout | int | No | Seconds to wait before returning a still-running job (default 100; 50 over MCP) |
| restart | bool | No | Stop a different run already going in the same slot and start this one |
cfa sample_motion_matching --actor BP_Hero_C_0 --seconds 3
cfa sample_motion_matching --actor BP_Hero_C_0 --steps '[{"keys":["W"],"seconds":2},{"keys":["W","A"],"seconds":2},{"keys":["S"],"seconds":1.5},{"keys":[],"seconds":1}]'validate_motion_matching_setupVerdict for an Anim Blueprint's Motion Matching: database pin, schema skeleton, index, Pose History placement, trajectory
Returns verdict = pass | pass_with_warnings | fail plus findings, read from the graph the way the compiler reads it. Errors: no_motion_matching_node, no_pose_history, database_pin_empty (the node holds a database but its visible Database pin is empty, and the compiler uses the pin), database_missing, database_no_schema, skeleton_mismatch, index_build_failed, pose_history_not_downstream (Pose History must sit between Motion Matching and the Output Pose), blueprint_compile_error. Warnings: no_trajectory (the search ignores where the character goes), pose_history_not_proven (a node in a nested graph), index_build_unfinished, not_compiled. Info: database_dynamic. Each finding names the node GUID and the command that fixes it. --build-index=false skips the index build.
| Parameter | Type | Required | Description |
|---|---|---|---|
| blueprint_path | string | Yes | Anim Blueprint path |
| build_index | bool | No | Also build each database's index and report a failed build |
cfa validate_motion_matching_setup /Game/MotionMatching/ABP_MM_Character