Hi everyone. I am creating a zombie maze game. Pretty obvious what I’ve got to do. Got my character working tagged as “player”, I’ve got box colliders on the bushes and i have an exit! I now am trying to add zombies to the game. I have no start script I am afraid. The zombies need to have 3 working animations “Zidle” and “Zwalk” then “Zattack”. I need the zombies to see me and follow within a certain distance, whilst not walking through the walls. Then when they are close to the player, attack me! I will worry about health and that lot later!!! any help appreciated thank you!!!
First step, you need a destination. To detect the player, you can use Raycasts, trigger and overlapsphere. To pick a random pos for idle, you have Random.inUnitSphere.
The steering. Your zombi need to be able to go from point A to point B with the correct rotation. The simplest way is to use transform.Translate, or lerp and position.
If there is an obstacle, you can either make the zombi bump into it (they are stupid, after all) or find a path. If you have pro there you can use unity’s path finding (but I can help) or you can try Aron’s one or Angry Ant’s one.