You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{ "date": "2026-02-16", "summary": "Enhanced 3D model documentation with animation controls, material types, origin/center points, and shadow configuration" },
Copy file name to clipboardExpand all lines: docs/gdevelop5/behaviors/pathfinding/index.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ When the behavior is added to an object, some properties can be modified:
14
14

15
15
16
16
***impassable:** if enabled, the obstacle is going to be impassable. The moving object will be avoiding them and never go through them.
17
-
***cost:** if the obstacle is not impassable, a cost can be set the obstacle. The moving object, when looking for the best possible path to a destination, will 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.
17
+
***cost:** if the obstacle is not impassable, a cost can be set for the obstacle. The moving object, when looking for the best possible path to a destination, will prefer to avoid obstacles 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. The cost value is a multiplier applied to the path length through that obstacle.
18
18
19
19
!!! tip
20
20
@@ -32,9 +32,11 @@ After we add the behavior to the object, we can customize a number of options:
32
32
***allow diagonals:** set if the object can move in diagonals.
33
33
***angle offset:** in case the sprite is facing the wrong direction we can set the angle offset
34
34
***extra border size:** sets the border size around the object. This setting determines how close the object can move to the obstacles.
35
+
***grid offset X/Y:** offsets the virtual grid position by the specified number of pixels. This can be useful to align the grid with your level layout. Default is 0 for both X and Y.
35
36
***max speed:** maximum speed the object can move on the path.
36
37
***rotate object:** if you don't want the object to rotate while moving on the path, disable the object's rotation.
37
38
***rotate speed:** sets the speed of the object's rotation.
39
+
***smoothing max cell gap:** controls path smoothing when diagonal movement is enabled. When set to 1 (default), the path is smoothed by removing unnecessary waypoints. Set to 0 to disable smoothing and follow the grid exactly. This is an advanced setting.
38
40
***virtual cell height and width:** the path is generated using a virtual grid. The size of the cells if this virtual grid can be changed. When the grid is smaller, the movement is more precise and can find path between objects - but is also more intensive for the device to compute.
0 commit comments