Detecting Player with the Security Cameras (Made with Unity)
Make cameras see the player
Objective: Activate the game over cutscene when the player collides with the camera cone.
First I created a new C# Script and added it to the cameras.
Then in the camera script I declared a variable to store the reference to the game over cutscene and assigned it in the inspector. In order to detect the player I used the OnTriggerEnter function and checked if the other object had the Player tag, if it is true we can activate the game over cutscene.
And that’s it!!!! The player has to watch out for the cameras.