Hi there i am busy looking to update my graph for when i place a new tower for a TD game, Thing is i am able to update the path but my objects will be pushed by other NPC’S or objects. I found out that what i am doing is a mistake and i am wandering if someone can point me in the right direction. Here is what i am doing wrong
"The GraphUpdateObject::updatePhysics variable matters a lot when updating grid graphs. If it is set to true, all nodes affected will have their height recalculated and then checked if they are still walkable. You usually want to leave this to true when updating a grid graph.
A common misstake is to create a new obstacle in the scene, and do something like this:
GameObject obstacle = GameObject.Instantiate (obstaclePrefab,somePosition,Quaternion.identity) as GameObject;
And expect the area under the obstacle to become unwalkable. The misstake is often that one does not check that the obstacle is in a layer which would make the nodes unwalkable in the first place. The GridGraph’s settings for collision checking has a mask field, one must make sure the obstacle is in a layer contained in that mask."
I need to update my path and do it the proper way but i cant find a pointer or anything.