> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinemation.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# ◻️Stride Modifier

> Documentation for ◻️Stride Modifier.

<iframe src="https://iframely.net/33zErZ5L" title="Embedded content" allow="encrypted-media *;" allowFullScreen className="w-full aspect-video rounded-xl" />

## Overview

**Stride Modifier** dynamically adjusts legs and pelvis motion to match the player trajectory and velocity.

<Frame caption={"Bone references."}>
  <img src="https://mintcdn.com/kinemation/zfSCxGML5W5QOyC1/images/cas/b7007c3abcd38a484698.png?fit=max&auto=format&n=zfSCxGML5W5QOyC1&q=85&s=3085e7f3edf2093414aabd49e45c84b0" alt="" width={440} data-path="images/cas/b7007c3abcd38a484698.png" />
</Frame>

<Tabs>
  <Tab title="Option">
    <Frame caption={"Warping settings."}>
      <img src="https://mintcdn.com/kinemation/JeFzhKqzivzKAwnI/images/cas/33c745b9abffc82958e0.png?fit=max&auto=format&n=JeFzhKqzivzKAwnI&q=85&s=616cfa8d32cc5a23e21a0ec7c37ab887" alt="" width={375} data-path="images/cas/33c745b9abffc82958e0.png" />
    </Frame>
  </Tab>

  <Tab title="Option">
    <Frame caption={"Pinning settings."}>
      <img src="https://mintcdn.com/kinemation/nSDKyNrRREbGib1F/images/cas/89eed43cbfe668552c41.png?fit=max&auto=format&n=nSDKyNrRREbGib1F&q=85&s=5a16b5c1a2821a18af736340325b7427" alt="" width={435} data-path="images/cas/89eed43cbfe668552c41.png" />
    </Frame>
  </Tab>
</Tabs>

#### Bone References

* **Pelvis** — pelvis bone reference.

* **Left Foot** — left foot bone reference.

* **Right Foot** — right foot bone reference.

* **Left Foot IK Target** — left foot IK target reference. This can be a special IK bone or CAS-generated `IK foot_l`.

* **Right Foot IK Target** — right foot IK target reference. This can be a special IK bone or CAS-generated `IK foot_r`.

#### Warping Settings

The Warping feature adjusts leg rotation to align with the movement trajectory and scales stride length based on the player's velocity.

* **Is Enabled** — turns the warping feature on or off.

* **Stride Smoothing** — controls how quickly the stride scale interpolates to its target value.

* **Min Stride Scale** — sets the minimum allowed stride length ratio.

* **Max Yaw Angle** — defines the maximum allowed yaw rotation angle.

* **Feet Smoothing** — controls how quickly the feet rotate to align with the trajectory.

* **Lean Smoothing** — controls the interpolation speed of the pelvis lean.

* **Pelvis Roll Scale** — sets the intensity of the pelvis roll rotation.

* **Leg Hip Rotation** — sets the intensity of the leg rotation toward the trajectory.

#### Pinning

The **Pinning** feature locks the feet in world space when they make contact with the surface, helping reduce foot sliding.

* **Is Enabled** — enables or disables the pinning feature.

* **Leg Stretch Factor** — defines the maximum allowed leg stretch.

* **Pin Yaw Threshold** — if this angle is exceeded, the feet become unpinned.

* **Angular Pin Threshold** — if the foot pitch angle is below this threshold, the foot may become pinned.

* **Pin Smoothing** — controls how quickly the foot interpolates when pinning or unpinning.

* **Pin Height Offset** — controls the height range at which a foot can be pinned.

## Use-cases

The **Stride Modifier** is generally used to create a more realistic character motion and reduce foot sliding.

To use it in your project, first add a **Character Trajectory** component to the character model.

<Frame caption={"Trajectory component."}>
  <img src="https://mintcdn.com/kinemation/bY9DOuHDrQwriMA1/images/cas/dff84a647ad5738a4190.png?fit=max&auto=format&n=bY9DOuHDrQwriMA1&q=85&s=9632ef8014fb5f354bb63beec644c97b" alt="" width={419} data-path="images/cas/dff84a647ad5738a4190.png" />
</Frame>

* **Past Trajectory Points** — number of past trajectory points.

* **Future Trajectory Points** — number of future trajectory points.

* **Trajectory Time Delta** — time step in seconds between each trajectory point.

* **Draw Gizmos** — toggles trajectory gizmos.

Next, add a **Stride Modifier** to your [Procedural Animation settings](/cas/core/procedural-animation) and place it before [Foot IK](/cas/modifiers/foot-ik) and [Step Modifiers](/cas/modifiers/step-modifier).

<Frame caption={"Stride Modifier."}>
  <img src="https://mintcdn.com/kinemation/nSDKyNrRREbGib1F/images/cas/9aa6c81c57a38aa2aa9d.png?fit=max&auto=format&n=nSDKyNrRREbGib1F&q=85&s=3ad3c7c8f2391b68efbb9a27ecc457d2" alt="" width={393} data-path="images/cas/9aa6c81c57a38aa2aa9d.png" />
</Frame>

<Tip>
  **Note**: The default settings are designed to work well with most characters, so they can usually be used without modification
</Tip>

Next, it's crucial to pre-process all movement animations used in your project. Go to **Tools ▸ KINEMATION ▸ Stride Curves**, assign the Character Model, drag and drop your animations and press "Compute Stride Curves".

<Frame caption={"Stride Curves tool."}>
  <img src="https://mintcdn.com/kinemation/JeFzhKqzivzKAwnI/images/cas/0a0ad528d0071976d72b.png?fit=max&auto=format&n=JeFzhKqzivzKAwnI&q=85&s=d652a407973711ff1155aa311ee6b333" alt="" width={390} data-path="images/cas/0a0ad528d0071976d72b.png" />
</Frame>

This action will add *StrideWeight*, *StrideSpeed*, *StrideX* and *StrideY* float curves to all processed animation clips.

Finally, add these float parameters to your Animator Controller.

<Frame caption={"How to add a float parameter."}>
  <img src="https://mintcdn.com/kinemation/bY9DOuHDrQwriMA1/images/cas/ea814fb131f22ee0b30b.png?fit=max&auto=format&n=bY9DOuHDrQwriMA1&q=85&s=b61d634e6f2d0c895d12547e1af41396" alt="" width={302} data-path="images/cas/ea814fb131f22ee0b30b.png" />
</Frame>

<Frame caption={"Add these parameters."}>
  <img src="https://mintcdn.com/kinemation/JeFzhKqzivzKAwnI/images/cas/3532d57b347318ce5439.png?fit=max&auto=format&n=JeFzhKqzivzKAwnI&q=85&s=1eda4695b7379d6ab7497fd5b7e1cc29" alt="" width={216} data-path="images/cas/3532d57b347318ce5439.png" />
</Frame>
