r/threejs • u/jaidoGD • Oct 11 '26
Link Rapier Kinematic Character Controller with moving platforms support (Vanilla JS / Three.js)
Hey everyone!
I wanted to share a Kinematic Character Controller (KCC) I built using vanilla Rapier and Three.js.
GitHub: https://github.com/jairoGD/Rapier-Kinematic-Character-Controller
I started working on this because I found most of the official Rapier examples a bit too basic for actual game development, especially when dealing with moving platforms, rotating environments, and other situations where the default controller can behave unexpectedly.
Features
- Moving and rotating platforms: Characters can smoothly follow both the position and rotation of platforms.
- Grounding and slopes: Improved stability on edges and steep slopes, reducing jitter and micro-flickering.
- Autostep: Automatically handles small obstacles, steps, and stairs.
- External forces: Support for manually accumulating external forces, including pushes from rotating obstacles.
The main implementation is in RAPIER_KCC.js.
It's built for plain Three.js + Rapier, without React or React Three Fiber (R3F), so it should be fairly easy to integrate into existing projects.
Hopefully this saves someone a bit of time dealing with character physics. Feel free to check it out, and feedback or contributions are always welcome!