Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gdevelop:documentation:manual:built_pathfinding [2017/09/19 20:14]
4ian
gdevelop:documentation:manual:built_pathfinding [2020/06/01 08:53] (current)
rapperdinesh [Using the behavior]
Line 1: Line 1:
 ====== Pathfinding ====== ====== Pathfinding ======
  
-The Pathfinding extension provides ​behavior that will allow your objects to avoid obstacles.\\+The Pathfinding extension provides behavior that will allow your objects to avoid obstacles.\\
 Pathfinding is not able to avoid obstacles that have moved after the object starts moving on its computed path.\\ Pathfinding is not able to avoid obstacles that have moved after the object starts moving on its computed path.\\
 To compute a path, GDevelop will use a virtual grid. You can set the size of this grid when editing an object with the behavior. To compute a path, GDevelop will use a virtual grid. You can set the size of this grid when editing an object with the behavior.
Line 18: Line 18:
  
 If your objects are bigger than the grid size, they can collide with obstacles when moving on their path. If your objects are bigger than the grid size, they can collide with obstacles when moving on their path.
-To avoid this, you can add "extra borders"​ to the obstacle when editing the behavior. For example, ​on this picture, the cells that are grayed represent the area that the "​pea"​ cannot cross :+To avoid this, you can add "extra borders"​ to the obstacle when editing the behavior. For example, ​in this picture, the cells that are grayed represent the area that the "​pea"​ cannot cross :
  
 {{gdevelop:​documentation:​manual:​newitem93.png?​nolink|}} {{gdevelop:​documentation:​manual:​newitem93.png?​nolink|}}
  
 However, the pea can collide with the obstacle.\\ However, the pea can collide with the obstacle.\\
-To avoid this, you can add one extra cell at the top, right, bottom and left of the obstacle. Then, the pea will properly avoid the obstacle :+To avoid this, you can add one extra cell at the top, right, bottomand left of the obstacle. Then, the pea will properly avoid the obstacle :
  
 {{gdevelop:​documentation:​manual:​newitem92.png?​nolink|}} {{gdevelop:​documentation:​manual:​newitem92.png?​nolink|}}