My journey becoming a Unity game developer: Coin Distraction-Use AI to make the guards find the coin dropped

Guards stop to look at the coin when dropped.
Guard1 Tags added to each Security Guard object.
Guards will be sent to the coin position when dropped.
Send AI to Coin Spot method takes the hit point parameter of where the coin will be positioned.
Guards moving to the coin’s position.
Send the coin position to the GuardAI script to use, and set the guards to walk to the coin.
Use the coinPos variable to measure the distance between the guards and the coin. Set guards to Idle animation when near the coin.
Guards Idle animation activated when near the coin.
Distance and stopping distance adjusted for the guards.
Guards stopping 5 meters away from the coin.



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.