Hello!
I am wondering if it would be more performant for me to use a shared path to move a group of zombies, say 4 or 5. I would be computing the path less frequently but I would need to add in other movement functions which would involve raycasting and distance checks to ensure the npc is moving with the group correctly. I guess what I am asking is, how heavy on performance is pathfinding vs multple raycasts/distance checks and would it be worth it for me to use a shared path.
Short moderate amount of raycasts aren’t expensive, distance checks aren’t expensive too. Pathfinding is usually far more expensive.
1 Like
For only 4 or 5 NPCs the default pathfinding will be fine. It’s only when you scale to the 100s that you really need to start to optimise them.
1 Like