Hello,
The game I am making has the the player clicking to make units go to places on a moving ship. As a result, I need to be able to generate a graph at runtime (got that), and also, instead of changing the position of the graph and rescanning the entire thing, I would just like to change the position of all of the nodes, as there shouldn’t be any new obstacles, just a shift of the entire graph of nodes as is.
For instance, if the ship moves in the x direction 5 units, all of the nodes should move 5 units in the x direction. In addition, all agents with a path they are following need to also have their path modified to move 5 units in the x direction. If the graph rotates on the x axis, those nodes who are on the x axis line will not change position, but the further away they are from it the more they will move … etc
I don’t think it would be difficult to write a script which would keep track of all generated paths and the transform of the ship associated with that grid in order to update them myself as it moves about, but I imagine something like this is already handled somewhere in the program, which will automatically update all nodes / paths associated with a grid, instead of me doing all of them separately. I just can’t find where it is. I know you can rescan the whole graph, but because this thing will be constantly moving it’ll be very laborious on processing - much faster to just shift the positions of the nodes / paths, I think
Thanks