Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public Camera cam;
- public Camera cam;
- private Camera newCam;
- bool playerDead = true;
- public Transform player;
- private bool hasSpawnedCam = false;
- if (playerDead)
- {
- if(!hasSpawnedCam)
- {
- newCam = Instantiate(cam, player.position, player.rotation);
- hasSpawnedCam = true;
- }
- if (newCam.transform.position.y < 20)
- {
- newCam.transform.Rotate(Vector3.down * 90);
- newCam.transform.position += new Vector3(0, 0.1f, 0);
- newCam.transform.LookAt(player);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement