Skip to content

Path shorcuts through blocked geometry #53

Description

@Pierdek

Hi, your algoritm creates shorcuts through blocked voxels.

Image

it seems there is an error inside:

AeonixPathFinder::BuildPath

if (points.Num() > 1)
{
points[0].Position = aTargetPos;
points[points.Num() - 1].Position = aStartPos;
}
else // If start and end are in the same voxel, just use the start and target positions.
{
if (points.Num() == 0)
points.Emplace();

points[0].Position = aTargetPos;
points.Emplace(aStartPos, StartLink.GetLayerIndex());

}

This piece of code overrides path's first and last point, in my opinion it should be removed and replaced with something like this:

PSEUDO CODE:

add first start pos point

while (aCameFrom.Contains(aCurrent) && !(aCurrent == aCameFrom[aCurrent]))
{
....
}

add target pos point

With that path looks better:

Image

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions