The problem is there is only one global obstacle map used for the pathfinding behavior. Everything pathfinds on the same map. So if you have object A with two obstacle types, and object B with no obstacle types, you have a conflict: should the one global map have those objects as obstacles, or not? In this case it happens to pick the global map where no obstacle types are defined. If you delete the red object there's no conflict any more and it uses the right obstacles.
I'm not sure how to resolve this - having multiple maps becomes memory inefficient and possibly slower, but on the other hand perhaps the obstacle types should be global as well to avoid this situation... the easiest thing to do is to make sure you have the same obstacles added for every object using the pathfinding behavior.
I can see why it would be memory inefficient, but as it is now the purpose of using custom obstacles kind of vanish as the benefit of using them, rather than just making objects solid was so you would be able to control obstacle settings for individual objects more specific I guess?
But the moment you have 2 or more different types of objects, the behaviour will bug, for instant a game where you have two units using pathfinding, a "Ship" and a "Tank" and for the ship you want the land area to be the obstacle and for the tanks the water area. Then there are no way of using pathfinding as it is now, as i see it? Im actually working on a game which uses both ships and land units, and what made me notice this problem in the first place.
Im by no means an expert in pathfinding, so might not be a huge help in finding a solution, but I did search around a bit for things, and I found something called Navmesh, whether its useful or not I have no clue.
[quote:2q7bd8gr]
From the second link
Benefits of a Navigation Mesh over pathnodes:
Reduction in node density
Since with a mesh we can represent a large area with a single polygon, overall graph density goes down. This is a win for many reasons:
Memory footprint is reduced with the decrease in nodes being stored.
Pathfinding times go down as the density of the graph being searched shrinks.
Less nodes means less time fixing up cross-level pathing information
A* with NavMesh Detailed
Navigation Mesh Reference
Edit:
Another way that might work, could be if you could create obstacle maps kind of like you would a layer. So as you add them you would be able to choose which obstacle map an object would use in the properties panel just like with layers. And maybe be able to switch them around during runtime and so on. But don't know If that would cause memory problems as well.