diff --git a/Content/Blueprint/Core/BP_3DtextHelp.uasset b/Content/Blueprint/Core/BP_3DtextHelp.uasset index 7074eae4..d3afa112 100644 Binary files a/Content/Blueprint/Core/BP_3DtextHelp.uasset and b/Content/Blueprint/Core/BP_3DtextHelp.uasset differ diff --git a/Content/Blueprint/Core/BP_NaviSplineCreator.uasset b/Content/Blueprint/Core/BP_NaviSplineCreator.uasset index 109bbe7d..a6a54b50 100644 Binary files a/Content/Blueprint/Core/BP_NaviSplineCreator.uasset and b/Content/Blueprint/Core/BP_NaviSplineCreator.uasset differ diff --git a/Content/Blueprint/Core/BP_allObjectCreate.uasset b/Content/Blueprint/Core/BP_allObjectCreate.uasset index f27c146f..f79cbb54 100644 Binary files a/Content/Blueprint/Core/BP_allObjectCreate.uasset and b/Content/Blueprint/Core/BP_allObjectCreate.uasset differ diff --git a/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset b/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset index c5c963fa..ad2444f8 100644 Binary files a/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset and b/Content/Blueprint/Core/BP_randomizeChangeMaterialTexture.uasset differ diff --git a/Content/Blueprint/RobotPawnActors/BP_mujokoStretch.uasset b/Content/Blueprint/RobotPawnActors/BP_mujokoStretch.uasset index 5b5309e5..df9ffdd3 100644 Binary files a/Content/Blueprint/RobotPawnActors/BP_mujokoStretch.uasset and b/Content/Blueprint/RobotPawnActors/BP_mujokoStretch.uasset differ diff --git a/Content/Blueprint/robotAccessoriesSensors/BP_CameraSensor.uasset b/Content/Blueprint/robotAccessoriesSensors/BP_CameraSensor.uasset index fe60999b..2c62ed37 100644 Binary files a/Content/Blueprint/robotAccessoriesSensors/BP_CameraSensor.uasset and b/Content/Blueprint/robotAccessoriesSensors/BP_CameraSensor.uasset differ diff --git a/Content/Developers/Wdev/Robots/BP_Stretch.uasset b/Content/Developers/Wdev/Robots/BP_Stretch.uasset index 384981b3..008f2f01 100644 Binary files a/Content/Developers/Wdev/Robots/BP_Stretch.uasset and b/Content/Developers/Wdev/Robots/BP_Stretch.uasset differ diff --git a/Content/GameBP/Core/BP_LuckyRobotsGameInstance.uasset b/Content/GameBP/Core/BP_LuckyRobotsGameInstance.uasset index b4747580..08ca0ca3 100644 Binary files a/Content/GameBP/Core/BP_LuckyRobotsGameInstance.uasset and b/Content/GameBP/Core/BP_LuckyRobotsGameInstance.uasset differ diff --git a/Content/GameBP/Gameplay/BP_TargetSelector.uasset b/Content/GameBP/Gameplay/BP_TargetSelector.uasset index e8804c7a..3edec88d 100644 Binary files a/Content/GameBP/Gameplay/BP_TargetSelector.uasset and b/Content/GameBP/Gameplay/BP_TargetSelector.uasset differ diff --git a/Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset b/Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset index a9cf138a..c17738c8 100644 Binary files a/Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset and b/Content/GameBP/UI/Common/WB_LuckyTextFieldLayout.uasset differ diff --git a/Content/GameBP/UI/Settings/WB_CaptureSettings.uasset b/Content/GameBP/UI/Settings/WB_CaptureSettings.uasset index 28cc5740..360b0698 100644 Binary files a/Content/GameBP/UI/Settings/WB_CaptureSettings.uasset and b/Content/GameBP/UI/Settings/WB_CaptureSettings.uasset differ diff --git a/Content/GameBP/UI/Settings/WB_TaskListView.uasset b/Content/GameBP/UI/Settings/WB_TaskListView.uasset index e290fdca..a12ea7f5 100644 Binary files a/Content/GameBP/UI/Settings/WB_TaskListView.uasset and b/Content/GameBP/UI/Settings/WB_TaskListView.uasset differ diff --git a/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp b/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp index ebc40ce3..9f494d93 100644 --- a/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp +++ b/Source/LuckyWorldV2/Private/Core/LuckyRobotsGameInstance.cpp @@ -242,7 +242,7 @@ FString ULuckyRobotsGameInstance::GetWriteFolderPath() return WriteFolderPath; } -TSoftObjectPtr ULuckyRobotsGameInstance::GetRandomMesh() +TSoftObjectPtr ULuckyRobotsGameInstance::GetRandomMesh(FTransform& SpawnTransform) { int32 MeshCount = GetCurrentRandomMeshes().Num(); if (MeshCount > 0) @@ -250,7 +250,19 @@ TSoftObjectPtr ULuckyRobotsGameInstance::GetRandomMesh() int32 RandomIndex = UKismetMathLibrary::RandomIntegerInRange(0, MeshCount - 1); if (GetCurrentRandomMeshes().IsValidIndex(RandomIndex)) { - return GetCurrentRandomMeshes()[RandomIndex]; + TSoftObjectPtr randommesh = (GetCurrentRandomMeshes()[RandomIndex]); + + TArray SelectableItemList = GetSelectableItemList(EItemCategory::Furniture); + for (auto SelectableItem : SelectableItemList) + { + if (SelectableItem.Mesh == randommesh) + { + SpawnTransform = SelectableItem.Transform; + break; + } + } + + return randommesh; } } diff --git a/Source/LuckyWorldV2/Public/Core/LuckyRobotsGameInstance.h b/Source/LuckyWorldV2/Public/Core/LuckyRobotsGameInstance.h index 06216130..8d2def0e 100644 --- a/Source/LuckyWorldV2/Public/Core/LuckyRobotsGameInstance.h +++ b/Source/LuckyWorldV2/Public/Core/LuckyRobotsGameInstance.h @@ -202,7 +202,7 @@ public: FString GetWriteFolderPath(); UFUNCTION(BlueprintPure) - TSoftObjectPtr GetRandomMesh(); + TSoftObjectPtr GetRandomMesh(FTransform& SpawnTransform); UFUNCTION(BlueprintPure, Category = "Selectable Items") TArray GetSelectableItemList(EItemCategory ItemCategory);