I am creating a 2.5d game using the platform controller script found in the tutorials. Well, when the character has reached a certain area- i want it to pan the maincamera. I achieved this, but it started effecting the death spawn() function. Every time she died, it ended up panning the camera. I believe it has something to do because i was using ontriggerEnter-- and every time she hit a death area- she died. The camera was panning fine in the area where i needed to. Any ideas on how to pan the camera without effecting the death spawn function would be helpful. Thanks.
var camcam: GameObject;
function OnTriggerEnter (other : Collider) {
yield WaitForSeconds (1); camcam.transform.Translate(Vector3(51,5,-27));
}