Mob Pathfinding backtracks or gets stuck when path segments are skipped
*Partner Rank:*
2
*Partner Team Reporting:*
Everbloom Studios
*Verification builds:*
beta 1.11.0.10 (Release_2012206) and beta 1.12.0.3 (Release_2120526) on Windows 10
*Summary:*
When the mob overshoots the path segment it is moving towards (for example, when they have high walking speeds), it tries to get back to that path segment they missed, even when they're closer to their target and further down their path.
*Impact:*
Mobs that are meant to be challenging to the player become easy to avoid and ignore
*Repro Steps:*
1. Create or open an existing world and find a cliff or a steep hill.
2. (optional) Enable path drawing and AI goals (/paths and /aigoals)
3. Spawn a zombie at the top of the hill and give them speed (speed 8 suggested)
(Speed is not necessary but it makes the mob overshoot its target block more often, and so it is easier to visualize this bug.)
4. Spawn a villager at the bottom of the hill (close enough for the zombie to see them)
5. Wait for the zombie to spot the villager and watch.
6. If not clear enough, kill them both and go back to step 3
*Observed Results:*
The zombie sometimes overshoots its intended path. They land closer to their target and further along their calculated path, but they insist on going back up to the path segment they missed.
*Expected Results:*
The zombie should walk to the nearest yellow path segment and mark the previous segments as traversed.
*Screenshots/Videos attached: Yes/No*
Yes
*Regression Builds:*
Unknown
*Notes:*
The issue ISN'T overshooting the target - the issue is with the mob trying to backtrack to the beginning of the yellow line when there is a path segment that's closer.
Video (exceeded maximum file size, so here it is on YouTube)