The getting started page says to add all of you obstacles to an “Obstacle” layer and then set that layer in the “Collision testing” section of the Grid Graph.
Exactly what should be considered an obstacle?
Also on my grid graph all of the interconnected lines are red (not the square pegs). I thought they were supposed to be blue? Couldn’t find a reference anywhere though.
btw the example grid graph scene doesn’t have obstacles set in the mask.
The lines are colored according to which area they are in. An area is defined as a group of nodes which can be reached from each other (a connected component). Two nodes which are colored differently cannot be reached from each other. So having a red color just means that it is in a different area, no problem at all.
The things that should be considered obstacles are what you wouldn’t want the player to walk in to. E.g a large box on the ground. Things that the player should be able to stand on, e.g ground, stairs etc. should not be obstacles.
If the obstacles are tall, you can however set them to be included in the height testing mask instead, this is what is done in the example scene for grid graphs. Since there will be a large height difference between the ground and on top of the “obstacle” (which is now not marked as an obstacle), the AI wouldn’t be able to climb up that slope (Max Climb in Grid Graph Settings) and therefore no connections would be generated there.
Okay it makes sense now thanks! I was a little confused because I was trying to match the colors up to what was being displayed in the settings and couldn’t find any mention of it in the documentation.
So obstacle mask are for things you never want the AI to traverse and height mask makes things obstacles if they are greater then Max Climb.