Character Controller
state: booting
grounded: no
pointer lock: click canvas
speed: 0.00
position: 0.0, 0.0, 0.0
WASD move, Shift sprint, Space jump
Fullscreen + wheel zooms camera
Overview
This example uses a character controller inspired from Sketchbook's third-person controller, and uses their iconic boxman model.
How it works?
terrainQuery.sampleTerrain(x, z)for synchronous elevation and normal samplingterrainRaycast.pick(ray)for downward terrain hit testing
That keeps the character grounded on the terrain.