I have a game world comprising of open spaces and buildings. Vehicles can’t travel through buildings but infantry can, albeit at a penalty. This sounds like a very common scenario but I can’t find a (the) solution to handle it.
I can see two ways to look at this…
- The penalty for nodes under a building are maxed out for vehicles yet not so for infantry units.
or…
- There are two different A* graphs, one that is processed for use for the vehicles and one set up for the infantry units.
Now, number 1 isn’t possible because there can only be one penalty value per graph node, yet number 2 seems like overkill.
Is there a proper solution to this problem?
Thanks.