Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5476 closed defect (fixed)

Units take detours around obstruction corners

Reported by: elexis Owned by: wraitii
Priority: Release Blocker Milestone: Alpha 24
Component: Simulation Keywords: regression
Cc: Patch: Phab:D1908

Description

Bug observed at least since r22342, r22426 and commits between.

When units receive an order to construct, dropoff or gather and the path is obstructed, they sometimes take a huge detour around buildings.

For example if a tree is 1m away from the unit, it may walk in a circle around the CC.

In other cases the unit only walks to one or two of the nearest corners of the obstruction.

The bug is seen here for instance https://youtu.be/uqHzawvxhO8?t=44

Attachments (1)

commands.txt (6.8 KB ) - added by elexis 5 years ago.
r22465 semi-minimal replay with some detours

Download all attachments as: .zip

Change History (6)

comment:1 by wraitii, 5 years ago

I think this is an older issue - perhaps highlighted by some UM changes, but pathing behaved weirdly before.

I believe D1908 and related fix these.

comment:2 by wraitii, 5 years ago

Patch: D1908

Indeed D1908 fixes this for me.

comment:3 by Freagarach, 5 years ago

Patch: D1908Phab:D1908

by elexis, 5 years ago

Attachment: commands.txt added

r22465 semi-minimal replay with some detours

comment:4 by wraitii, 5 years ago

Owner: set to wraitii
Resolution: fixed
Status: newclosed

In 22473:

Vertex pathfinder - fixes to quadrant optimisation to ensure units don't take detours around obstructions.
Compute the outward quadrants once and for all instead of setting them dynamically, because there is no reason why we should always arrive from the same quadrant as the first time we see a vertex.
Don't consider quadrants for the start-vertex, because of the edge expansion (which can put us in illegal quadrants)

These result in (much) better paths, the tradeoff being that we now look at some more vertices.

Fixes #5476

Differential Revision: https://code.wildfiregames.com/D1908

comment:5 by elexis, 5 years ago

Keywords: regression added
Note: See TracTickets for help on using tickets.