- Home /
Duplicate Question
Guides or Tutorials for a Very Basic Enemy AI? [Unity 5]
Hi there!! ^^ I'm on the making of a Very simple game for PC and Android! =) I have almost everything set up except for my enemies. For now, as this is a simple concept or "Alpha" of what this game will be about, the enemies are singular cubes, i want this cubes to patrol "Pre-Established" patrol points and if it sees the player on sight, it can be able of chasing him and eventually, on a single collision, end the game. (With out getting stuck on walls xP) I have done some of the simple stuff like Re-Spawn for the player, make the player get destroyed on a collision with the enemies and so on ... but i failed to develop some sort of system that allows the Enemy locate the player and go on his search :/ So i came here to see if any of you can share some "internet knowledge" with me and sending me to a page where i can find a decent tutorial on this matter. ^^ (Since the Stealth Tutorial [Where they talk about Enemy AI] doesn't support Unity 5.X and it is developed with a WAY more complex system than my game)
For what i have read and seen on the previous investigation for this question, it should be the Enemy GameObject + movement script + trigger spherical collider + a "Detection Script" But i do not have ANY idea of what to put on the detection script and how to making it related to the enemy movement u.u ... Also ... that stuff of the NavMesh got me a little confused. Thank you so much for any kind of help!! :'3 (My apologies if the description is too long xP)
Answer by getyour411 · Aug 16, 2015 at 01:13 AM
IMHO, NavMesh is out of scope of a very basic AI. The detect script is essentially the trigger collider
OnTrigger
if col.tag = "Player"
// do stuff like chase
Movement and waypoints are covered many times in UA, Google, YouTube, other; search first, indicate what you've tried and post with specifics and your relevant script code.
Follow this Question
Related Questions
It does not add money to player when it should ? 2 Answers
Emit Particle upon Death 2 Answers
How can i do a Very basic enemy AI or chase system? Unity 5 1 Answer
Enemy wont damage player 0 Answers