How do I check if a path is possible while I am moving an object?
Let’s say I have a “build placement script” which is updating the building’s current position to the mouse position.
In this function I’ve added the “GraphUpdateUtilities.UpdateGraphsNoBlock” function to check is the path between the start and target node is blocked …
So, if I place a building I am calling the function “AstarPath.active.Scan();”
If I move the next building over the build grid, the position shows red. Red = Invalid Position
I am expecting a valid position here and not an invalid position.
This is how I am checking the position: https://hastebin.com/iloxumoleb.cs
I am updating the GraphUpdateObject every time when the mouse is moved.
What I am really missing here is a visualization of the path.
Thank You for your help and time =)