How exactly does the FollowController follow the “lookAtObject”? Is it supposed to? And, in a similar strain, can the documentation be any less helpful?
I am using this type of thing:
In initEngine() I have:
...
camera = view.camera;
cameraController = new FollowController(camera, null, 45,20);
...
in assetCompleteHnd(), when it loads the mesh I want to follow, I have:
...
cameraController.lookAtObject = theMesh;
...
and in the frameHnd(), I have:
...
if (theMesh)
{
theMesh.rotationY += currentRotationInc;
}
cameraController.update();
view.render();
...
That seems to work—the camera tracks the rotations. However, in updateMovement() I have:
...
theMesh.z += dir * FLY_SPEED;
cameraController.update();
view.render();
...
and the camera does not follow theMesh off into the distance.
So . . . what is going on?