Changes between Initial Version and Version 2 of Ticket #3644


Ignore:
Timestamp:
Jul 6, 2017, 4:00:44 AM (7 years ago)
Author:
causative
Comment:

I investigated what I believe is a similar issue when working on unit sliding. The issue there was a discrepancy between unit motion and the short pathfinder. If two units are very close together with their obstruction squares overlapping, and you request a short path for one unit to go to the other side of the second unit, the short pathfinder will often say the first unit can simply go directly to the goal point. Unit motion, however, knows that the first unit can't go directly to the goal point, so the first unit is never able to follow the short path it was given, resulting in it being stuck.

I believe this is probably the issue here, with the dock's obstruction square taking the place of the second unit.

Why does the short pathfinder act like that? I haven't thoroughly investigated, but it may have to do with the fact that for unit motion, unit obstruction squares are shrunk slightly which lets the un-shrunk squares overlap. The short pathfinder would treat these overlapping squares as colliding. The short pathfinder allows colliding units to move out of collision, so it would allow the first unit to move "out of collision" all the way through the second unit. There's also something going on with EDGE_EXPAND_DELTA in CCmpPathfinder_Vertex.cpp which alters the obstructions that the short pathfinder sees, and may contribute to the problem.

To fix this problem, the short pathfinder would need to be more conservative than unit motion - never returning a path that unit motion can't follow.

Legend:

Unmodified
Added
Removed
Modified