I'm wanting to set up a camera flyby in several parts of my game. For example, when the game starts maybe have the camera flying over the land and into the player as some basic story elements scroll by, or when you approach an important land mark, you might have a flyby around the object.
I just don't know where to start so any direction would be great. I think this would be a cool feature to add to an already fast improving project.
In Maya (or Max or whatever) animate the path you want the camera to travel. This will be in world coordinates. Import into Unity as an animation. As you play the animation you can get the position and rotation of the animated node. Apply this to your camera and you will have a fly-by camera.
Since flyby cams happen in world coordinates they are best used in static geometry, or scene init, when you can predict the location of objects. You dont want to have your flyby camera look great in Maya but then get blocked ingame by dynamic geo that just happens to be in front of your camera.
Show-me Cam
When you are showing off dynamic objects in the world you can't use world coordinates because the object could be positioned anywhere. For these move to a show me camera, this gets more complicated and won't look as artsy and fancy as your flyby camera. But its dynamic and thats cool in itself.
So for the show-me cam, move the camera to the same position of the target object. Then start pulling the camera back while checking for collisions. Stop when you hit something. Once again, you are trying to avoid your cameras view being blocked by another object.
If you can't avoid another object getting into your shot you can fade out the offender or push the camera higher. I dont like the object-fade-out solution but I've been forced to implement it in enough games that I include it as an option.