pathfinding now working for distance 2 or less
This commit is contained in:
@@ -26,7 +26,7 @@ void AAdventurePlayerController::SetupInputComponent()
|
||||
Super::SetupInputComponent();
|
||||
|
||||
// This is initialized on startup, you can go straight to binding
|
||||
InputComponent->BindAction("LeftClick", IE_Pressed, this, &AAdventurePlayerController::AdvClick);
|
||||
// InputComponent->BindAction("LeftClick", IE_Pressed, this, &AAdventurePlayerController::AdvClick);
|
||||
}
|
||||
|
||||
void AAdventurePlayerController::AdvClick()
|
||||
@@ -37,7 +37,7 @@ void AAdventurePlayerController::AdvClick()
|
||||
if (IsValid(Hit.GetActor()))
|
||||
{
|
||||
AHexTile* HitHex = (AHexTile*)Hit.GetActor();
|
||||
// MapRef->FindPathAStar(CurrentHex, HitHex); // this would currently cause a crash...
|
||||
UE_LOG(LogTemp, Warning, TEXT("%d"), HitHex->Index);
|
||||
MapRef->FindPathAStar(CurrentHex, HitHex);
|
||||
// UE_LOG(LogTemp, Warning, TEXT("%d"), HitHex->Index);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user