I am using a custom point graph. How can I programmatically add a connection from one node to another, ignoring the max distance variable? I have tried adding new connections but it just routes through nodes already there. I want one node to connect to another node directly, even if it is further than the max distance variable.
The reason I can’t just have it connect through current nodes and update the penalties is that I’m looking to have gates. If you enter a gate at node A going to node C, it goes A->B->C. The gate is not enterable from B. I would like pathfinding to prefer the gated connections while still somehow understanding that you can’t enter a gate lane somewhere in the middle.
Ok, I was hoping that the flood fill was what I was missing but it still isn’t working. Here is a picture showing what is wrong:
The white lines show where there should be special gate lanes. Along the top there are paths but these are the normal node to neighbor node connections, there is no gate lane direct connection. The middle white line again shows where there should be a gate lane but here it is very obvious there is no connection.
That definitely looks like it should work.
Do you think it would be possible for you to create a small example scene (or just your whole project if it is hard to separate) which shows the problem that I could take a look at?
Also, make sure the graph is not scanned after you have modified those connections.
I actually managed to force connections tonight but it seems messed up at the moment. I believe that I simply made a mistake somewhere in my caching lists. I will try to fix it up tomorrow, so hopefully I have my system working soon.