I have to calculate AI movement along a game board that has discrete tiles but the game board changes (deterministically) every turn and therefore the AI needs to look ahead through those changes to determine an optimal path. Is there anything in the Unity navigation that can help me here or is this a Roll-Your-Own situation?
Unusable tiles would get an obsticle placed on them which would make the path be calculated around them.
Another possibility with Unity 5.6 and up might be to disable the navmesh component of each tile as they become unuseable ( I havent tested 5.6 enough to know if that would work).
Right but the map is changing each turn, which means the agent needs to look at how the map will be at each turn as it calculates the movement, rather than just calculating the entire movement based on the current map.
Is there maybe some sort of callback I can handle that would let me feed the agent the state of the board for each step as it calculates?
I don’t see how that would help, as you would still have an agent making bad decisions and just constantly recalculating looking like a Roomba when someone is constantly changing the room around it
The key here is the changes are deterministic, which means the agent CAN calculate an optimal path if it processes all the changes for each move ahead of time, just as a player would.
oh i got you… sorry i misunderstood… i thought you were just having an issue after the map changed getting navigation to your desired location… I’m pretty sure you’ll need to write some code to get what you need for this “Roll-Your-Own situation”. Not sure the best solution for this… Vector3[] points =agent.path.corners; will give you the path not sure that would help much