I’ve been trying to make an agent take flanking routes to its destination. I know when the agent has to take a flanking route (just raycast to see if a waypoint is in the line of sight), but I don’t know how to get that path using PathfindingService.
Suppose the following scenario: there is an agent and its target separated by a wall. The agent wants to get to its target without being seen. The shortest path is to walk in front of the target’s line of sight - but that means the agent would be seen. The flanking path is to go around the other way, like shown here:
The green lines indicate where the target can see, the red line indicates the shortest path and the blue line indicates the flanking path (the path that I want to get).
Is there any way to do this with PathfindingService, or will I have to use an alternative pathfinding algorithm?