Secure the Area in Unity

Getting Started

2 Cameras with its cone of vision on display

Creating the Logic

Using a CoRoutine

Detecting the Player

Animating the Cameras

Final Touches

  • Set “Is Trigger” to true in the Mesh Collider (to help determine if the player has collided with the cone)
  • Add a Rigidbody (to allow for Triggers to work)
  • Add the script you’ve just created and add the corresponding game objects.

Final Product

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store