I really need it so when I press the sprint key my POV changes like in every game, but every tutorial is old and doesn’t work. I would really appreciate some help. TY
You could do something like this:
public class Player : MonoBehaviour {
public float sprintFOV = 80f;
private float normalFOV;
void Start()
{
normalFOV = Camera.main.fieldOfView;//set normal field of view
}
void Update()
{
if(sprinting)//you have to set sprinting bool yourself
{
Camera.main.fieldOfView = sprintFOV;//set FOV to sprinting
}
else
{
Camera.main.fieldOfView = normalFOV;//set FOV to normal
}
}
}
or animate it using unity’s animation system.