Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
gdevelop5:behaviors:pathfinding [2019/05/29 12:04]
akbarhabeebb [Add behaviour to object] Making it same (Behavior spelling)
gdevelop5:behaviors:pathfinding [2019/05/29 12:05] (current)
akbarhabeebb [Option 2: Pathfinding Obstacle behavior] Typo
Line 42: Line 42:
  
   * **impassable:​** if we enable this, the obstacle is going to be impassable. The moving object is going to avoid it at all cost.   * **impassable:​** if we enable this, the obstacle is going to be impassable. The moving object is going to avoid it at all cost.
-  * **cost:** if the obstacle is not impassable, we can set a cost for the obstacle. The moving object, when looking for the best possible path to a destination,​ is going to prefer to avoid the obstacle with high cost values. For example, a river might have some cost. The moving object, if possible, ​ will avoid it. However, if there is no other way around the river, or if the river has a lower cost compared to another area, the moving object will go through it (instead of climbing a mountain with a higher cost for example). And if we put crocodiles into the river and increase its cost, the moving object might decide to climb the mountains instead.+  * **cost:** if the obstacle is not impassable, we can set a cost for the obstacle. The moving object, when looking for the best possible path to a destination,​ is going to prefer to avoid the obstacle with high-cost values. For example, a river might have some cost. The moving object, if possible, ​ will avoid it. However, if there is no other way around the river, or if the river has a lower cost compared to another area, the moving object will go through it (instead of climbing a mountain with a higher cost for example). And if we put crocodiles into the river and increase its cost, the moving object might decide to climb the mountains instead.
  
 ## Examples ​ ## Examples ​