Is there any good way to create a recalibrating pathfinder?

The general concept of using a Pathfinder is to create a path using parameters. You have a start part, end path, and some variables that would affect which parts you could take and how you traverse them. Then, the pathfinding service would create a path if the service finds a successful one. Your character would complete each point that leads to the path in a sequential order until it reaches the final point.

Now, that is a very basic way to use a Pathfinder. The final point would be blocked. Sure, you could use the blocked event. However, what if the path that is blocked is due to a constantly changing event? You can’t expect the event to fire every time, right? I think that the event is specific to one path only, either way.

So, eventually you would have to create a new path constantly to match the constantly changing environment of the game. The problem with that is if you constantly loop a new path, it would overwrite any current paths. Plus, the new path does not base the direction after the previous one. So, not only is not reaching any waypoints at all, but its zig-zagging in place due to a constantly changing start direction.

Is the only way to really create a pathfinder to have it create a new waypoint after finishing a couple new points? Even then, that may have some gaming flaws.

i’m not sure if that’s the only good way. the last time i’ve created a pathfinder, i created a RunService connection, had it constantly recalculate a path until the npc reaches the target, and once the target is reached, disconnect the connection.

1 Like

Did it fidget around, or did you have it wait before it recalculated its path?

1 Like

sometimes it would fidget, but i assumed it was roblox being roblox. (i did not wait before i had it recalculate)

1 Like