Updated Positions of Items to Merchant Shop

Fixed the origin of the items and properly positioned and scaled items to make the merchant shop work fully
This commit is contained in:
Marcel Hara 2023-03-16 17:18:01 +00:00
parent a838c82e9c
commit 0779e31c75
4 changed files with 16 additions and 23 deletions

Binary file not shown.

BIN
Content/Levels/Build.umap (Stored with Git LFS)

Binary file not shown.

View File

@ -219,7 +219,7 @@ void ATempCharacter::InputDisabler()
{ {
PlayerCharacter->DisableInput(GetWorld()->GetFirstPlayerController()); PlayerCharacter->DisableInput(GetWorld()->GetFirstPlayerController());
} }
//TURNING OFF CROSSHAIR & IMPORTANT STATS //TURNING OFF CROSSHAIR
CrossHairWidget->SetVisibility(ESlateVisibility::Hidden); CrossHairWidget->SetVisibility(ESlateVisibility::Hidden);
ImportantStatsWidget->SetVisibility(ESlateVisibility::Hidden); ImportantStatsWidget->SetVisibility(ESlateVisibility::Hidden);
@ -228,14 +228,14 @@ void ATempCharacter::InputDisabler()
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
PlayerController->SetInputMode(FInputModeUIOnly()); PlayerController->SetInputMode(FInputModeUIOnly());
PlayerController->bShowMouseCursor = true; PlayerController->bShowMouseCursor = true;
disableTab = true; disableTab = true;
if (ThisCamera != nullptr) if (ThisCamera != nullptr)
{ {
return; OriginalCameraLocation = ThisCamera->GetComponentLocation();
} OriginalCameraRotation = ThisCamera->GetComponentRotation();
else
{
OriginalCameraFOV = ThisCamera->FieldOfView; OriginalCameraFOV = ThisCamera->FieldOfView;
UE_LOG(LogTemp, Display, TEXT("Original Camera Location: %s"), *OriginalCameraLocation.ToString());
} }
} }
@ -246,27 +246,20 @@ void ATempCharacter::InputEnabler()
{ {
PlayerCharacter->EnableInput(GetWorld()->GetFirstPlayerController()); PlayerCharacter->EnableInput(GetWorld()->GetFirstPlayerController());
} }
//TURNING ON THE CROSSHAIR AND IMPORTANTSTATS WIDGET
CrossHairWidget->SetVisibility(ESlateVisibility::Visible);
ImportantStatsWidget->SetVisibility(ESlateVisibility::Visible);
//Reset UI Mode //Reset UI Mode
APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); APlayerController* PlayerController = GetWorld()->GetFirstPlayerController();
PlayerController->SetInputMode(FInputModeGameOnly()); PlayerController->SetInputMode(FInputModeGameOnly());
PlayerController->bShowMouseCursor = false; PlayerController->bShowMouseCursor = false;
UE_LOG(LogTemp, Display, TEXT("Enabling Inputs"));
disableTab = true; disableTab = true;
TraceDistance = 300; TraceDistance = 300;
if (ThisCamera != nullptr) if (ThisCamera != nullptr)
{ {
return; ThisCamera->SetWorldLocation(OriginalCameraLocation);
} ThisCamera->SetWorldRotation(OriginalCameraRotation);
else
{
ThisCamera->FieldOfView = OriginalCameraFOV; ThisCamera->FieldOfView = OriginalCameraFOV;
ThisCamera->ResetRelativeTransform(); UE_LOG(LogTemp, Display, TEXT("Original Camera Location: %s"), *OriginalCameraLocation.ToString());
} }
} }