Any tips on how to transition between 1st Person camera and 3rd Person camera? An example would be the Metroid Prime games and Perfect Dark 64. Camera moves from inside the player's head to behind the player and vice-versa.
You could have two cameras, one first person and one third person, and change the depth values to change which one the player sees. As far as making it smooth, if you are using a smooth follow script on your third person camera, then you could script its distance down to a small number and then swap depths, and when you want to swap back, swap depths back and then script the distance back to what you want it to be.
You could set two positions: a 3rd person position and a first person position. When you want to transition between the two, move the camera to the desired point over a second or two.
Here's an example of something you could put in update to transition to first person (FpsPosition is the Vector3 position of the camera in FPS view, transitionRate is how long the transition would take, FPSview is a boolean which is true when you want to be in FPS mode) ;
var curVect : Vector3= FpsPosition-transform.localPosition;
if (transform.localPosition!=FpsPosition && FPSView){
if(Mathf.Abs(Vector3.Distance(transform.localPosition , FpsPosition)) < curVect.magnitude/transitionRate*Time.deltaTime){
transform.localPosition=FpsPosition;
} else {
transform.localPosition += curVect/transitionRate*Time.deltaTime;
}
}
To do it for third person would be more or less the same, just put check that FPSView is false, and transform toward the Third person camera position.