void ANPC::OverlapBeginTB(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OhterComp, int32 OthterBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
{
//GEngine->AddOnScreenDebugMessage(-1, 5.0f, FColor::Magenta, TEXT("Debug"));
if (WidgetRef)
{
itemShopWidget= CreateWidget<UItemShop>(GetWorld(), WidgetRef);
itemShopWidget->ownerNPC = this;
if(itemShopWidget)itemShopWidget->AddToViewport();
}
APlayerController* MyPlayerController = UGameplayStatics::GetPlayerController(this,0);
MyPlayerController->SetViewTargetWithBlend(this,1.f);
MyPlayerController->SetInputMode(FInputModeUIOnly());
MyPlayerController->SetShowMouseCursor(true);
}
'언리얼수업 > 최종프로젝트' 카테고리의 다른 글
SurvivorsTemplate epic (0) | 2024.03.24 |
---|---|
마우스클릭으로 포제스하기 Possess (0) | 2024.03.18 |
5초간 피해 계산하기 (0) | 2024.03.08 |
폰빙의 Possess (0) | 2024.03.02 |
Moving Actor - TimeLine Lerp (0) | 2024.02.28 |