I want to create an open environment (Zombie style game) where you walk around a large area. And there is zombies everywhere, and only when you get close to them do they attack otherwise they just play some idle walking animations.
What’s the best way to go about this? Should I have a script constantly running on my player that checks distance between x zombie/npc and if they come within range turn on pathfinding for the NPC? And turn off if out of range?
What’s the best solution to this? Thanks.