fixed bug where only one tile was processed.

This commit is contained in:
LuisPoveda 2022-10-25 01:05:56 +02:00 committed by bernat
parent 9718e233b4
commit 810c65399e
1 changed files with 4 additions and 6 deletions

View File

@ -676,11 +676,9 @@ TArray<FString> AVegetationManager::GetTilesInUse()
const FBox Box = Procedural->ProceduralComponent->GetBounds();
if (!Box.IsValid)
continue;
if (Box.IsInside(HeroVehicle->GetActorLocation()))
{
const FTransform GlobalTransform = LargeMap->LocalToGlobalTransform(HeroVehicle->GetActorTransform());
if (Box.IsInside(GlobalTransform.GetLocation()))
Results.Emplace(Element.Key);
break;
}
}
return Results;
}