Hi,
I have a project which requires me to dynamically pathfind to moving targets, currently my code looks like this:
void Update(){
Pathfind(target.position);
}
void Pathfind(Vector3 target){
// if the target hasn't moved enough, ignore this request
if (Distance(target, previousTarget) < 1) return;
// use seeker to move to the place
}
But the issue I’m having is that when the object moves, the enemy stops when pathfinding is calculated, so it’s straightforward to outrun them. (Moving from tile to tile causes them to pause for like 0.5s).
I am using a custom GridGraph, game is 2D.