godotengine / godotengine/godot

Edgecentered 2d navigation agent path postprocessing does not give shortest path

Open
#110,252 4 comments 0 reactions 0 assignees View on GitHub
topic:2d topic:navigation
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

Godot custom built from master branch. (b432e108d50fd436d04d0f79b0a7cab8985032f7)

### System information

Windows 11

### Issue description

Seen on latest. On diagonal navigation, tends to snake around instead of giving shortest paths. Example screenshot taken from example project:

Image

### Steps to reproduce

Have a isometric tilemap, and use a navigation agent on it configured to edge_centered postprocess. Navigate straight up/down or straight left/right (what would be diagonal on a traditional square tilemap)

### Minimal reproduction project (MRP)

[Project.zip](https://github.com/user-attachments/files/22140635/Project.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached Project.zip and reproduce the issue using an isometric tilemap and a navigation agent configured for edge_centered postprocessing. Compare the generated path when navigating vertically or horizontally, then trace the edge_centered navigation postprocessing entry point in Godot's navigation code. Done means those routes no longer snake and produce the shortest path.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, godot
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.