Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Unity 3D Enemy AI Programmer

A topic by Lilzk22 created Feb 13, 2020 Views: 230 Replies: 1
Viewing posts 1 to 2

Im currently working on a survival game but Ive hit a block. Im a designer but i know a little bit of coding. Im trying to write up a script where the enemy is allowed to traverse the map via navmesh from a point to point,but once the player is spotted it chases the player until out of the FOV on the enemy where it will then go towards the nearest point and continues its point to point.I would really apprciate any kind of help and will be sure to credit you.

(+1)

Hey! I haven't really done any navmesh stuff yet but I'd recommend trying this:

Make a transparent object that is the enemy's FOV, add a collider to it and then make the script run the navmesh traversing function while player collision with the FOV object is false and if its true then chase him. (basically an if true/false statement inside a while loop).