pathfinding now working for distance 2 or less

This commit is contained in:
2022-01-17 17:53:54 +01:00
parent 32f4c6a278
commit 6c1c0579cb
3 changed files with 106 additions and 35 deletions
+4
View File
@@ -26,6 +26,8 @@ public:
int32 GridSize = 100; // squared is the number of Tiles
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
int32 TileSize = 100;
UPROPERTY()
UWorld* World;
UFUNCTION(BlueprintCallable, Category = "Generation")
void MakeGrid();
@@ -42,6 +44,8 @@ public:
TArray<AHexTile*> Neighbors(AHexTile* OfHex);
UFUNCTION(BlueprintCallable, Category = "Runtime")
TArray<AHexTile*> FindPathAStar(AHexTile* Start, AHexTile* Goal);
//UFUNCTION(BlueprintCallable, Category = "Runtime")
// TArray<AHexTile*> FindPathAStarPQ(AHexTile* Start, AHexTile* Goal);
// Player spawn section
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)