- Home /
NavMesh agent Pathfinding Zombies
What i want to do is similiar what in Call of Duty Nazi zombies mode
Player is in house, zombies are going to eat the player but if there is door in zombie's path/way then he have to break that door first and then continue to the player.
I was thinking something like this
Zombie is scanning all doors including empty door holes, then chooses the one what is closest to him and goes that way EVEN if there is empty door hole like 5m longer distance but it always chooses the closest want, thats what i want for that part, but i dont know how i can make this work properly.
I tried to add collider box to doors and stop zombies and i somehow got it work but its not quite right i guess because zombies are still coming a bit through the doors and if player is next to that door zombies start hurting the player because i use simple check like this
if(Distance < 2.0f) { ZombieAttackPlayer(); }
I need some help how i can do this system properly, please and thanks!
Answer by ToasterKyle · Jan 03, 2016 at 09:32 AM
http://docs.unity3d.com/ScriptReference/NavMesh.html
Edit: Sorry, what I actually believe you are looking for is this http://docs.unity3d.com/ScriptReference/NavMeshAgent.html
Your answer
Follow this Question
Related Questions
NavMesh Update Path 0 Answers
Navmesh with destructible obstacles 1 Answer
How to sample a point on a navMesh Agent path 0 Answers
Connecting two navmeshes without "Speedboost" 0 Answers
NavMeshAgent Not Accounting for Objects 0 Answers