# Fixing foot sliding by reading the clip's own feet

> Odd & Out moves animation clips far faster than they were made for. The game analyses each clip's foot tracks to find real touchdowns and add a stomp and waddle.

Canonical page: https://andersonmancini.dev/blog/odd-and-out-foot-slide-gait-analysis

Published: 2026-10-08 · 2 min read · Tags: animation, game-dev, three.js, javascript, odd-and-out

The characters of [Odd & Out](https://andersonmancini.dev/blog/odd-and-out.md) use animation clips from asset packs, made for a body walking at a human's pace. The game moves them far faster than that, so the legs cannot keep up and the feet slide. Two small modules fix it, and both are plain numbers over animation tracks, so Node can test them.

## 1. Read the clip

`analyseGait()` reads the clip's foot tracks and returns:

- when each foot touches the ground, as a 0 to 1 position in the cycle,
- the ground speed the clip implies: how fast the stance feet move back.

The stance is the longest stretch of the cycle the foot spends under a threshold, because a foot can dip under it for a moment mid-swing, such as in a run, and that is not a footfall. The touchdown is interpolated between the two keys it falls between.

Footsteps, dust and the walk-to-run hand-over then land on the *real* touchdowns.

## 2. Make the walk a bound

`enhanceGait()` turns the walk into a bound: both feet and the body rise together halfway between touchdowns, so the character skims along instead of dragging its feet, and the arms and torso swing a little wider.

## 3. Give each hero a style

A table of numbers makes each character walk like themselves:

- **cadence**: steps per second as a function of speed, capped,
- **stomp**: the legs hold a moment at each touchdown and snap through the swing,
- **waddle**: a side-to-side roll and a twist, more when running,
- **thud**: a small squash on each footfall,
- **hang time**: lighter gravity near the top of a jump,
- **squat**: how deep it crouches before jumping.

Odd is heavy and rolls from foot to foot with a stomp. Out is a quick little patterer, bobbing its big head. Springs on the head and arms are laid over the clip, so Odd's cap lags and flops.

The map side of the game is in [the fog of war post](https://andersonmancini.dev/blog/odd-and-out-fog-of-war-in-128x128-bytes.md). The project is on its [project page](https://andersonmancini.dev/projects/odd-and-out-game.md).

## Related projects

- [Odd & Out Game](https://andersonmancini.dev/projects/odd-and-out-game.md) — Free co-op alien adventure for the browser
