Is it possible to get the gameobjects blocking path?

Took me a while but everything is working Aron, thanks, I would like to ask one more thing, I figured that I can use the penalty number to simplify a lot another bit of my code, as I can use the different penalties to prioritize some targets, this is what I’m currently using to see if the path is free of buildings:

 public static bool IsPathFreeOfBuildings(Seeker test)
        {
            foreach (var nodes in test.GetCurrentPath().path)
            {
                if(nodes.Tag != 0)
                {
                    return false;
                }
            }

            Debug.Log("Path is free of buildings");
            return true;
        }

however the nodes.penalty is always 0, even when the tag seems to be correct, in this example tag 1 has a huge penalty, but it is always 0 in the code:

image
image

Based in the documentation I think I’m looking in the right place but I assume that penalty is just not set somehow?

1 Like