August 2018
Intermediate to advanced
528 pages
10h 58m
English
The next control we'll look at is FlyControls. With FlyControls, you can fly around a scene using controls also found in flight simulators. An example can be found in 05-fly-controls-camera.html. The following screenshot shows a still image of this example:

Enabling FlyControls works in the same manner as TrackballControls. First, load the correct JavaScript file:
<script type="text/javascript" src="../libs/FlyControls.js"></script>
Next, we configure the controls and attach them to the camera, as follows:
var flyControls = new THREE.FlyControls(camera); flyControls.movementSpeed = 25; flyControls.domElement = document.querySelector('#WebGL-output'); ...Read now
Unlock full access