I'm making a SpriteKit game where two SpriteNodes are in a maze. That maze is represented as a grid. One sprite (A) travels faster than the other (B). Items randomly pop up, and the sprites have to collect them.
Pathfinding is easy (GKGridGraph is simple to use).
Here's the problem: At any given time, A and B could be on the same stretch of the maze. If A is behind B, I want A to be forced to go the same speed as B (cannot pass through or around). How can I accomplish this?
Thank you for your time!