Size: 2
Input Response Feature: Yes
Quality Feature: Yes
Explanation:
The ‘Momentum 2D’ match feature is used to match the character’s body velocity. This is typically a standard metric in motion matching. By matching this metric, momentum can be preserved, improving animation where sudden changes in motion occur. This can help prevent animations like ‘starts’, ‘stops’ and ‘plants’ being skipped.
This this match feature is usually used for quality purposes, it can also be used for responsiveness. The main use case for using it as a ‘response’ type feature is so that the animations picked better match the ‘actual’ body velocity of the capsule. Use ‘Momentum 2D’ as a response match feature when using controller-based movement rather than root motion.
Settings
The ‘Momentum 2D’ match feature does not have any specific settings as it is a fixed feature that doesn’t allow customization. It only has a setting for default weight which controls the how much impact this match feature has for motion matching.
Data Layout
The ‘Momentum 2D’ match feature consists of 2 floats representing a 2D vector. This vector is the current velocity of the character in 2D space (Vertical ‘Z’ axis ignored). The data is laid out as follows:
|| BodyVel_X | BodyVel_Y ||
Runtime Input Extraction
As this match feature can be used as an ‘input response’ you may need to extract the body velocity data at runtime as an input into your motion matching node. This can be extracted from a ‘Character Movement Component’ using helper functions to populate a float array. However, advanced users that understand the layout of motion matching data with ‘Motion Symphony’ can populate the input array any way they like (even manually if they desire).
Note: This is only required if using Momentum 2D as an ‘input response’ type match feature.