August 2018
Intermediate to advanced
528 pages
10h 58m
English
As the name implies, FirstPersonControls allows you to control the camera just like in a first-person shooter. The mouse is used to look around, and the keyboard is used to walk around. You can find an example in 07-first-person-camera.html. The following screenshot shows a still image of this example:

Creating these controls follows the same principles as the ones followed for other controls we've seen until now. The example we've just shown uses the following configuration:
var fpControls = new THREE.FirstPersonControls(camera);fpControls.lookSpeed = 0.4;fpControls.movementSpeed = 20;fpControls.lookVertical = true;fpControls.constrainVertical ...
Read now
Unlock full access