Moving the avatar:

Transferring the controls over to control a cube (as a test avatar) was relatively simple, after a few failed attempts I figured out that you only have to change the object that is passed to the controls function.  Thus changing “controls = new THREE.FlyControls( camera );” to “controls = new THREE.FlyControls( movingCube );” and of course creating the movingCube object prior to calling the controls.

Unfortunately this doesn’t move the camera with the movingCube object and there are no examples that have an avatar in front of the camera so I’m going to have to go further afield to figure this one out.

Leave a comment