See Preferred physics engine (cannon.js, ammo.js, DIY...).
For just player controls, if you don’t need other physics, a navmesh used with the clampStep()
method of three-pathfinding can be used too. It’s cheaper, but requires you to create the navmesh in advance.