A* Pathfinding Project

Problem with GraphUpdateObject 4.2 Pro


#1

Hi
I am trying to write my own GraphUpdateObject for a GridGraph but I cant make it work.
WillUpdateNode is called but Apply is not. What am I doing wrong?
Here is the code:

public class MovingObstacleGUO : GraphUpdateObject
{

    public MovingObstacleGUO(Bounds bounds) : base(bounds)
    {
        updatePhysics = false;
        updateErosion = false;
        modifyWalkability = false;
    }

    public override void WillUpdateNode(GraphNode node)
    {
        Debug.Log("WillUpdateNode");
    }

    public override void Apply(GraphNode node)
    {
        Debug.Log("Apply");
    }
}

#2

Hi

Sorry for the late answer. I have been traveling and have not been able to answer support requests for some time.
The Apply method is called for all nodes which are strictly inside the bounding box. Are you sure your bounding box is large enough, even on the y axis?
The WillUpdateNode method is called for any nodes which may be updated. Note that these may be outside the bounding box due to effects such as erosion, connectivity updates, etc.