At the moment I’m using only a PointGraph for cars, but after I will add a GridGraph for “human” agents. Could I have any problem with Scan for multiple graphs (since the pointgraph doesn’t change, but the gridgraph could change in runtime)?
My GridGraph nodes are on a set of planes aligned each other. if I use a GraphUpdateObject, the nodes are not updated: the changedNodes list of guo is not empty but I cannot see difference in the graph either for tag or walkable nodes.
I tried using a cube and it works, but I cannot change the objects in the scene. So what can I do?
I did an attempt with cubes and planes (of Unity) and GraphUpdateObject rightly updates penalties.
My meshes are the real problem, in fact GUO works perfectly only for three out all of them (the bounds of collider are passed to constructor of GUO). I don’t understand why.
I have a kind of deadline for this work so I really appreciate your help!
Probably I found a bug, I don’t know if it is can called so.
I solved my problem positioning all other meshes at the same Y of those three ones where the creation of GUO worked. It’s a naive solution, but it could be a start point to review the library.
Bounds b = gameObject.collider.bounds; //this is a plane that is part of gridgraph
I am a bit worried about that line.
A bounds object is a 3D volume, not a 2D one. So if you take the bounds of a plane, it will not have a height and thus it is very unlikely that any nodes were inside that 0 unit thick volume. Try setting the height of the volume to some non-zero value to make sure that the nodes are actually contained in it.
If you see the size properties of a box collider for a plane, the y value is very very small but not equal to 0, so probably it is assumed a little volume even for the plane and everything works for bounds object.
I solved my problem positioning all other meshes at the same Y of those three ones where the creation of GUO worked. It’s a naive solution, but it could be a start point to review the library.
I am not exactly sure what meshes you are referring to, but that sounds like you made sure that the nodes are all generated at that exact spot where the bounds object is. So yes.