How do I stop the camera from moving after the player dies?

I want to stop the camera from moving so that it stays at the position it is at when the player dies. How would I do this?

there are two easy methods you can use

  1. cam.position = new vector3(position where you wanna freeze);
    or,
  2. attach a rigid body and freeze x,y,z, constraints of position;

you should check player health ,if it falls to 0 , then stop your camera :).

   for example (a healthManager script)

   public int Health;

   public void GiveDamage(){
     Health-=Damage;//

    if(Health<=0){

    //Stop Camera

   }

   }