Hello, is it possible to move graph nodes around during run time? Ideally I’d like them to follow a GameObject. What is the recommended way?
I should note that I am talking about point graphs in particular.
Hi
There is an example in the docs showing this: http://arongranberg.com/astar/docs/_move_point_node_8cs-example.php
It seems I have forgot to update that example though, it says positions are not supported, but they are now, so you can just remove the code throwing the exception and uncomment the rest of the code.
Or do you mean moving the whole graph?
In that case, check out the example scene called “Moving” which does just that (the scene only exists in the pro version however).
If you only have the free version, check out this thread: http://www.arongranberg.com/vanillaforums/discussion/comment/936/#Comment_936
Thank you Aron. Will connections be maintained even if they are moved out of range that the initial scan wouldnt connect them?
I did mean just a single node.
The example code issues a GraphUpdate request, that request will recalculate the connections. If you remove that line, it will keep all connections.