SlopeSpeedCurve ScriptableObject
Overview
The SlopeSpeedCurve scriptable object is used by the grounded Movement state to allow more control over the character's speed on slopes. The X axis of the curve represents the slope, from slope limit downhill at -1 to completely flat at 0 and up to the character slope limit uphill at 1. The y value is the amount of horizontal speed that is maintained when deflected by the slope.

The Movement state aligns its target velocity to the ground surface, clamps the new move vector to the original movement speed and then multiplies by the result of the slope speed curve at the relevant angle. This means that the character can maintain their speed up to a set angle and then it drops off slowly as they approach the limit instead of hitting an invisible wall as the slope angle increases.
Inspector

Properties
| Name | Type | Description |
|---|---|---|
| Curve | AnimationCurve | The desired speed curve as specified above. Ensure that the x-axis extends from -1 to 1 and the y-axis does not go below 0. |