Hello,
I am running a grid graph and I’m building on it some stairs that are 90 degrees angle.
I call UpdateGraphs but the result gets me nodes being higher than they should:
before: ( 3000, 0, 3500)
before: ( 4000, 0, 3500)
before: ( 3000, 0, 4500)
before: ( 4000, 0, 4500)
before: ( 5000, 0, 3500)
Center: (4.00, 1.50, 3.50), Extents: (1.50, 1.50, 0.50) ( Bounds used for UpdateGraphs )
after: ( 3000, 1000, 3500)
after: ( 4000, 2000, 3500)
after: ( 3000, 240, 4500)
after: ( 4000, 240, 4500)
after: ( 5000, 3000, 3500)
PS: It shouldn’t matter but I’m calling FlushGraph right after Update:
AstarPath.active.UpdateGraphs( b );
AstarPath.active.FlushGraphUpdates();
You can see in the image below that the floor is later risen by 0.1 even though the bounds are the green area. Any ideas?
Hi
When updating the graph (when graphUpdateObject.updatePhysics=true, which is the default), it will update all necessary nodes to ensure that arbitrary changes inside the given bounding box are handled. This may mean updating more nodes than those strictly inside the bounding box.
I’m not sure why the nodes are raised, though. They should be recalculated exactly as if the graph had been scanned from scratch. If you press the Scan button, are the nodes raised up?
It’s kinda hard to say since my code relied on caching and breaks if I scan during runtime but yes it seems that all my prepositioned stairs get raised a bit if I scan a second time but not the first time:
In this image, the arrow points to the built one and the other two are prepositioned there:
Just noticed that it’s doing it for flat stuff with no verticality too:
Did you have any clues on this btw?
Don’t know. Check your collider bounding boxe.