Hi all, what do you think fits better in this next case ? :
I player in third person controller, when the player runs, the camera´s fov increases to 70, … when the player walks the camera´s fov return to 50… i want to fade that… i have two ways (or at least i know) to make this :
In the animation window trace an animation curve of the camera´s fov from 50 to 70, and name it “increase_fov”
and create another animation curve from 70 to 50 and name it “decrease_fov”
then, according to the magnitude of the controller velocity, the animations crossfades between them.
the other way i have in mind is with For loops :
var cam : Camera;
function TheFOV (mode: String) {
if (mode == increase){
for (var a : int = 50; a <=70; a++){
cam.fieldOfView = a;
yield WaitForSeconds(.2f);
}
else if (mode == decrease){
for (var b : int = 70; a >= 50; a--){
cam.fieldOfView = b;
yield WaitForSeconds(.2f);
}
}
In performance, what´s better?
thanks.