A character controller for CesiumJS

Hello Cesium community

I’d like to share a small library I’ve been working on: cesium-player-controller.

1

It’s ported from my three.js project three-player-controller, rebuilt on top of CesiumJS and the Rapier physics engine. Out of the box it gives you capsule-based character collision, animation, first-/third-person switching, and camera obstacle avoidance.
Features

  • Capsule collision powered by Rapier
  • Walking, running, jumping, and flying, with directional and fly animations
  • First-person and third-person views, plus over-the-shoulder and spring-camera options
  • Collision sources from terrain, glTF/GLB models, or custom tri-meshes
  • Customizable key mapping and built-in mobile virtual controls (joystick + buttons)
  • Runtime model/animation swapping and a rich set of state-query APIs

One note worth mentioning: since CesiumJS can’t read 3D Tiles vertex data directly on the CPU, I made a companion tool, collider-forge, to help build collision meshes.

:link: Live demo: hh-hang.github.io/cesium-player-controller/
:link: GitHub: github.com/hh-hang/cesium-player-controller

I’d love to hear any feedback or suggestions, and I plan to keep maintaining and improving it. Thanks for your time!

Added a 3D Gaussian Splatting (3DGS) example. Feel free to give it a try!

Live demo: cesium-player-controller