character-walking

Installation
SKILL.md

Character walking

Target: Three.js 0.187.0 WebGPU, Jolt 1.1.0 (jolt-physics WASM, jolt-physics.wasm-compat.js).

scripts/walking-controller.js has two parts:

  • createJoltCharacter(Jolt, jolt, physicsSystem, opts): builds a CharacterVirtual capsule with standing and crouching shapes and the filters it needs, and exposes the four calls the controller uses.
  • createWalker({ character, gravity }): turns a wish direction, a camera yaw, a speed and a jump flag into capsule velocity, with the rules below.

The controller only needs the adapter interface, so another physics library can be used by writing an adapter with the same four calls: setCrouch(bool), extendedUpdate(velocity, dt), state() and teleport(x, y, z).

The rules that make walking feel right

Installs
105
GitHub Stars
8
First Seen
Oct 30, 2026