Featured · Physics · Character Controller
Omnidirectional Gravity Controller
A custom character controller built from scratch, independent of Roblox's default Humanoid. Gravity can point in any direction, so players can run up walls, across ceilings and around curved geometry. Momentum carrying through every change in gravity.
- Gravity in any direction. The character's orientation, ground checks, and movement are all relative to the current gravity vector, not world space.
- Momentum preservation. Velocity carries through surface and gravity changes, so movement stays fluid at high speed.
- Custom impulses and applied velocity. Other gameplay systems can push, launch or accelerate the character through one interface.
Hardest problem: slopes
Slopes caused constant jitter, and it came from several sources at once. Ground detection flickered, and the controller overcorrected the character's alignment. When compounded with high speeds, the character while sliding down bounced and or stopped abruptly while the correction forces fought current motion.
The fix: I clamped movement velocity against the ground's normal vector, so the controller never pushes the character into or away from the surface. I also lowered the ground-detection tolerance. Together, these removed the jitter and kept high-speed slides smooth without losing momentum.
- Luau
- Custom physics
- Vector math
- Raycasting
- Debugging