The distance matching node handles the runtime logic for the distance matching node. Place it in your animation graph in place of a sequence player depending on what kind of motion you wish to distance match.
Node Setup
Step 1: Add a distance matching node in the desired state.
Step 2: Select the node and set the source animation sequence to use in the settings panel.
Step 3: In the ‘Distance Curve Name’ property, type the name of the animation curve you wish to use for distance matching. If you are using the Motion Symphony animation modifiers the default of ‘MoSymph_Distance’ will work.
Step 4: Set the movement type depending on the desired behavior and the nature of the animation
None - distance matching disabled
Backward - Match distance backward to a point as the character moves away from it (used for start type animations)
Forward - Match distance forward to a point as the character approaches it (used for stop type animations)
Both -Math distance forward and then backward once the point is reached (used for plant type animations
Step 5: Create a distance variable to use as input for your distance matching node and connect it to the “Desired Distance’ pin or bind it through the details panel.
This distance variable will need to be measured and set every frame that distance matching is required. This can either be done with your own logic or by using the ‘Distance Matching Component’ which is detailed on the next page.
Node Settings
This section will explain each setting on the Distance matching node as shown tin the image above:
Desired Distance: The current distance from the distance marker. This is the main input into the distance matching node. You can either calculate the desired distance yourself or use the DistanceMatching component to do it for you.
Distance Curve Name: The name of the distance curve on your animation (the default name for distance curves created with the animation modifiers that come with Motion Symphony is ‘MoSymph_Distance”.
Negate Distance Curve: This will reverse the sign of the distance curve. This may be necessary if your distance curves were generated without the MoSymph animation modifier and the sign happens to be opposite. This is the case for all distance curve of Epic Paragon characters.
Movement Type: The type of distance matching movement
Forward - Matching the distance going towards a point (usually used for stops)
Backeard - Matching the distance moving away from a point (usually used for starts)
Both - Matching the distance going towards a point and then matching distance moving away from it again (usually used for plants).
Distance Limit: A limit on the distance value for distance matching. If the distance to the marker it greater than this value then the animation will just play at normal speed
Destination Reached Threshold: The distance to the marker at which the marker is considered to be reached.
Smooth Rate: A rate of smoothing for the distance matching. This is intended to be a fast smooth to improve the fluidity of motion. Smoothing will be cancelled if the time jump is too great based on the Smooth Time Threshold described below.
Smoothing Time Threshold: If the animation time between two consecutive distance matching frames is greater than this value, smoothing will be turned off for that frame to prevent the animation appearing as if it is being sped up.
Sequence: The animation sequence to use for this distance matching node.