Level 3 Custom companion cube actors
This commit is contained in:
parent
aa6dad4e05
commit
20654327c0
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/L_Level3.umap
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/L_Level3.umap
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Test/Actors/RuntimeLoadTest/BP_Test_RuntimeLoad.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Test/Actors/RuntimeLoadTest/BP_Test_RuntimeLoad.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/BP_CompanionPipe.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/BP_CompanionPipe.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/DA_RAIMaquett_Level3_CompanionPipe.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/DA_RAIMaquett_Level3_CompanionPipe.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/BP_CompanionPyramid.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/BP_CompanionPyramid.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/DA_RAIMaquett_Level3_CompanionPyramid.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/DA_RAIMaquett_Level3_CompanionPyramid.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/BP_CompanionSphere.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/BP_CompanionSphere.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/DA_RAIMaquett_Level3_CompanionSphere.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/DA_RAIMaquett_Level3_CompanionSphere.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -53,7 +53,7 @@ TArray<FString> UContentLoader::ParseDirectoryIndex(const TArray<uint8>& content
|
||||
if(contentType == httpContentTypeHtml)
|
||||
{
|
||||
std::string contentHtml{ reinterpret_cast<const char*>(content.GetData()), static_cast<size_t>(content.Num()) };
|
||||
std::regex hrefRegex(R"(<a href="((?!\.)[^"]+))");
|
||||
std::regex hrefRegex(R"(<a href="((?!\.)[^"]+.pak))");
|
||||
std::smatch match;
|
||||
auto it = contentHtml.cbegin();
|
||||
auto end = contentHtml.cend();
|
||||
@ -96,9 +96,11 @@ FString UContentLoader::SelectContentByMethod(const TArray<FString>& content, co
|
||||
}
|
||||
}
|
||||
|
||||
void UContentLoader::DownloadPak(FContentDownloadedCallback downloadedCallback, const EContentDownloadMethod method)
|
||||
void UContentLoader::DownloadPak(FContentDownloadedCallback downloadedCallback, const FString& directory, const EContentDownloadMethod method)
|
||||
{
|
||||
UE_LOG(LogTemp, Log, TEXT("ContentLoader: Requesting pak http index at %s."), pakIndexUrl);
|
||||
const FString url = FString::Printf(TEXT("%s%s/"), pakIndexUrl, *directory);
|
||||
|
||||
UE_LOG(LogTemp, Log, TEXT("ContentLoader: Requesting pak http index at %s."), *url);
|
||||
|
||||
FHttpRequestCompleteDelegate indexRequestCallback;
|
||||
indexRequestCallback.BindLambda([=, this](FHttpRequestPtr request, FHttpResponsePtr response, bool successful)
|
||||
@ -151,10 +153,10 @@ void UContentLoader::DownloadPak(FContentDownloadedCallback downloadedCallback,
|
||||
});
|
||||
|
||||
UE_LOG(LogTemp, Log, TEXT("ContentLoader: Starting to download pak %s from index."), *pakToDownload);
|
||||
HttpGet(FString::Printf(TEXT("%s%s"), pakIndexUrl, *pakToDownload), pakDownloadCallback);
|
||||
HttpGet(FString::Printf(TEXT("%s%s"), *url, *pakToDownload), pakDownloadCallback);
|
||||
});
|
||||
|
||||
HttpGet(pakIndexUrl, indexRequestCallback);
|
||||
HttpGet(url, indexRequestCallback);
|
||||
}
|
||||
|
||||
UClass* UContentLoader::LoadPak(const FString& pakFilePath)
|
||||
|
@ -27,7 +27,7 @@ class UContentLoader : public UGameInstanceSubsystem
|
||||
|
||||
public:
|
||||
UFUNCTION(BlueprintCallable, Category = "ContentLoader")
|
||||
void DownloadPak(FContentDownloadedCallback downloadedCallback, const EContentDownloadMethod method = EContentDownloadMethod::NonRepeatRandom);
|
||||
void DownloadPak(FContentDownloadedCallback downloadedCallback, const FString& directory = "", const EContentDownloadMethod method = EContentDownloadMethod::NonRepeatRandom);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "ContentLoader")
|
||||
UClass* LoadPak(const FString& pakFilePath);
|
||||
|
@ -225,6 +225,9 @@ void UDialogueManager::BeginDestroy()
|
||||
|
||||
void UDialogueManager::OnDialogueEnd()
|
||||
{
|
||||
if(!IsValid(this))
|
||||
return;
|
||||
|
||||
timersLock.Lock();
|
||||
timers.RemoveAt(leadDialogueTimerId);
|
||||
timersLock.Unlock();
|
||||
|
@ -144,6 +144,11 @@ void UMoveInteractableModificator::TurnOnRotating()
|
||||
FScopeLock lock1(&critical);
|
||||
rotating = true;
|
||||
player->LockPlayer({ .camera = true });
|
||||
if(positionUpdateType == PositionUpdateType::Physics)
|
||||
{
|
||||
primitive->SetEnableGravity(false);
|
||||
//primitive->UpdatePhysicsVolume(false);
|
||||
}
|
||||
ProcessState();
|
||||
AMainGameModeBase::GetWidgetsManager()->AnimateInteractionHint(this, 1, EInputAnimatedWidgetAnimation::Hold);
|
||||
OnRotating.Broadcast();
|
||||
@ -153,6 +158,11 @@ void UMoveInteractableModificator::TurnOffRotating()
|
||||
FScopeLock lock1(&critical);
|
||||
rotating = false;
|
||||
player->UnlockPlayer({ .camera = true });
|
||||
if(positionUpdateType == PositionUpdateType::Physics)
|
||||
{
|
||||
primitive->SetEnableGravity(true);
|
||||
//primitive->UpdatePhysicsVolume(false);
|
||||
}
|
||||
ProcessState();
|
||||
AMainGameModeBase::GetWidgetsManager()->AnimateInteractionHint(this, 1, EInputAnimatedWidgetAnimation::Unhold);
|
||||
}
|
||||
@ -187,6 +197,8 @@ void UMoveInteractableModificator::UpdatePosition()
|
||||
auto camLoc = player->GetCameraLocation();
|
||||
auto dir = player->GetCameraDirection();
|
||||
auto newLoc = camLoc + dir * distance;
|
||||
if(actor)
|
||||
newLoc += actor->GetTransform().GetRotation().RotateVector(originOffset * actor->GetTransform().GetScale3D());
|
||||
|
||||
auto rot = actor->GetActorQuat();
|
||||
bool blocked = MoveIsBlocked(newLoc, rot) || player->nearScanner->ComponentOverlapComponent(primitive, newLoc, actor->GetActorQuat(), {});
|
||||
|
@ -37,6 +37,9 @@ public:
|
||||
UPROPERTY(BlueprintAssignable)
|
||||
FRotatingMoveInteractableModificatorActivatedDelegate OnRotating;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
FVector originOffset;
|
||||
|
||||
protected:
|
||||
float distance = 0;
|
||||
float minDistance = 100.0f;
|
||||
|
@ -160,7 +160,7 @@ void UWidgetsManager::AddOverlayWidget(UUserWidget* widget)
|
||||
void UWidgetsManager::RemoveOverlayWidget(UUserWidget* widget)
|
||||
{
|
||||
overlayWidgetsInstances.Remove(widget);
|
||||
widget->RemoveFromViewport();
|
||||
widget->RemoveFromParent();
|
||||
}
|
||||
|
||||
|
||||
@ -189,7 +189,7 @@ void UWidgetsManager::SwitchCheatMenu()
|
||||
|
||||
void UWidgetsManager::ShowCheatMenu()
|
||||
{
|
||||
if(cheatMenuWidget || mainMenuWidget->Visibility == ESlateVisibility::Visible)
|
||||
if(cheatMenuWidget || mainMenuWidget->GetVisibility() == ESlateVisibility::Visible)
|
||||
return;
|
||||
|
||||
if(auto PC = UGameplayStatics::GetPlayerController(GetWorld(), 0))
|
||||
|
Loading…
Reference in New Issue
Block a user