Hi, your algoritm creates shorcuts through blocked voxels.
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:
Regards
Hi, your algoritm creates shorcuts through blocked voxels.
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();
}
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:
Regards