My journey becoming a Unity game developer: Enemy AI-Setup the guards to patrol the area (Part 6)

Darren detected and captured
Waypoints added and positions modified for each of the guards paths.
Player has a Layer created for the guards rays to focus on.
Using raycast for the guards to detect the player.
Rays being shown when the guard detects Darren.
Substituted SphereCast for Raycast with a radius representing the guard’s view.
SphereCast detecting Darren easier than Raycast for the guard.
Eye game object created and scaled to represent the view of the 1st guard.
Eyes game objects duplicated with component values pasted for the other 2 guards.
Eyes game objects Is Trigger turned on and script attached.
Rigidbody added to trigger the Eyes game objects.
Darren detected by the guards and game over cutscene plays.
Capture cutscene fade in adjusted to take a little longer.
Main Camera position changed from adjusting the game over cutscene.
Main Camera position and rotation attached to the Start Camera.
Main Camera position fixed to start the game.




Learning to become a Unity game developer.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Smallest distroless nginx container < alpine

Network Topology Setup For Access Control

Guide to Time-zones, Conversion between Zones and Storing in MySQL

iWave Unveils the Implementation of ARINC 818–2 IP Core On Microsemi PolarFire FPGA

Advent of Cyber 3 Day 14 — Dev(Insecure)Ops Walkthrough

Stack unwinding during exception handling in C++

Layout of program memory and stack memory.

OSD600 — Start

Scaling our inventory cache reads to 1000X

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
Rhett Haynes

Rhett Haynes

Learning to become a Unity game developer.

More from Medium

My journey becoming a Unity game developer: 2.5D Infinite Runner-URP and Player’s 3D model added

Cookies and Lights in Unity 2020

Animating Sprites in Unity

Platformer: Collectible & Status Bar