Camera location to camera location animation

I am needing a bit of help with a script that will allow an animation from view point to view point with a camera, or series of cameras. For an example see:

http://www.buchhofer.com/upload/files/labs/drexel/

Brilliant architectural viz work by Dave Buchhofer!!

Thanks!

You should be more specific about what exactly you need help with. I have no idea what exactly you are asking for.

From what I saw, all that they did was use Lerp and LookAt.

var lookAtTarget : Transform; //What to look at
var current : Transform; //Where to start
var transitionTime : float = 1.0f; //Time to take to transition

function Start() { //Initial positioning
    if(current) transform.position = current.position; //position
    if(lookAtTarget) transform.LookAt(lookAtTarget); //look at target
}

//Call this with the transform to move to.
static function MoveCamera(target : Transform) {
    if(!target || current == target) return; //Nowhere to go
    if(!current) { //Nowhere to start from, so initial positioning
        transform.position = target.position; //position
        if(lookAtTarget) transform.LookAt(lookAtTarget); //look at target
    }
    else {
        var control : float = 0; //Amount along transition
        while(control < 1.0) { //Continue until we reach the destination
            control += Time.deltaTime/transitionTime; //move along transition
            transform.position = Vector3.Lerp(current.position, target.position,
                Mathf.SmoothStep(0.0, 1.0, control)); //Smoothing optional
            if(lookAtTarget) transform.LookAt(lookAtTarget); //look at target
            yield; //wait
        }
    }
    current = target; //we're now at the target's position;
}

If you want to instantly switch camera position and orientation to some other position/orientation, you could use `transform.position = target.position; transform.rotation = target.rotation;` If you want to actually switch to a different camera, you could enable/disable cameras with `camera.enabled = false; target.camera.enabled = true;` or something like that.

I keep getting compile errors with this script. This is javascript correct?