- Home /
Duplicate Question
How can i do a Very basic enemy AI or chase system? Unity 5
Hi there!! ^^ I'm on the making of a very simple game ... and until now it is going pretty well =) The only thing left are the enemy "AI" (If it even deserves that name xP) For now, as this is an Alpha state or "Concept" the current enemies are just singular cubes! ^^ I want this cubes to "Patrol" determined points on the map and chase the player on sight with the intention of "Finish Him". I have everything else, the collider "Termination", the respawn, the menus, in singular words i have a completed game ... but i just need this last part and honestly i do not know what to do.
You already asked this, and it was closed as this is a duplicate question.
http://answers.unity3d.com/questions/1029577/guides-or-tutorials-for-a-very-basic-enemy-ai-unit.html
There are countless examples - what have your searched for, tried and include your script code. Not to be harsh but this is not a script writing service.
Answer by mattyman174 · Aug 16, 2015 at 05:21 AM
Use a Sphere trigger as your AIs "detection radius" (you could also do something clever along with this and give the AI a FOV) once the Player enters the Sphere, the AI can change to a state of Attack. If it doesnt know where the player is, simply get the cubes to do a simple move to some target points until the Player becomes aware to the AI.
Does this make sense?
mmm yeah ... kinda xP I still having to get used to the "Program$$anonymous$$g Logic" .... Anyway, i have a couples of doubts about it ... How can i give the AI a FOV? I mean, if there is a wall between them how can i "Not allow it" to see the player? ...