Disable Auto Connections On Point Graph?


#1

I’m creating a city sim game with roads and want to use the NodeLink component to manually create connections. Is there a way to disable the distance check for connections or should I just set the distance to something really small?


#2

Hi

Setting the distance to something really small will work.
You could also create all nodes and connections manually by using PointGraph.AddNode and GraphNode.AddConnection which might be easier for your use case.


#3

So I should use AstarPath.RegisterSafeUpdate to manually add them and just not use the scan function at all?

Also would it be possible to tell the seeker to follow a bezier path between nodes through a modifier or something? (Edit) Found the simple smooth bezier modifier, I’ll have a look at that some more.


#4

Hi

You still have to scan it just for the point graph to become initialized (I think at least, but I suppose you could try without it). However you could just pass it a GameObject with no children so that it doesn’t generate any nodes at all.
Then you can update it inside RegisterSafeUpdate.