I am currently creating a top down zombie game with spritekit, and I need to implement pathfinding with zombies. I can't find many tutorials on this online, and the few I have found only describe a player and are quite outdated. I have obstacles throughout the course, as well as a defined GKGraphNode with the obstacles removed. I just need to know how to implement the entity side of pathfinding. Thank you!
Asked
Active
Viewed 275 times
1 Answers
0
Use a GKGoal on a GKAgent(your zombie). This is An influence that motivates the movement of one or more agents.
With Agents and Goals you can add certain behaviours to your zombies to make them move toward the player. eg init(toSeekAgent: GKAgent)
Goals and Agents are a part of the Entity Component System

Chris Karani
- 40
- 1
- 7