I intend to use DetourCrowd AI controller to simulate pedestrians in a city. But I’m not sure how do I go about implementing some additional rules on their path, for example, stopping at a crosswalk and waiting for traffic lights to go green and only then continuing navigation across the street?
What would be the correct way to intercept DetourCrowd navigation and add custom logic to stop and wait?
Also, is there any way to combine DetourCrowd with some kind of course path (maybe using splines?) so the course path is not being recalculated and navmesh is used only for calculating fine path applying DetourCrowd to avoid other pedestrians and obstacles while sticking to the general course path?
It would be ideal to have something like MoveToActorThroughWaypoints method where I could pass an array of my own waypoint coordinates and pass a callback function pointer that would be called every time when the AI controlled pawn reaches the waypoint, so I could intercept the path, for example, at crosswalks and apply custom behavior task to determine what to do next - continue, wait or abandon the path entirely. Is there any technique to achieve something like that?