Connecting the camera and avatar:

After scouring the internet, I found a useful StackOverflow post of someone who had a similar problem and an example of a chaseCam ( The solution turned out to be easy enough, by adding the camera to the movingCube object “movingCube.add(camera);” instead of the scene and positioning it back slightly the camera becomes a child of the cube and inherits its global positioning. It is also required to set the camera to look at the cube object through a useful function provided by three.js “camera.lookAt(movingCube .position);”. This means that although you set the camera position to be further back than the movingCube, as the parent object (being the cube) moves the child’s (camera) position will stay relative to it, whilst always looking at the cube.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s