Sofa Scale is tiny, it needs to be proper size
When spawning objects, ensure that it is spawned in a visible spot without colliding with other terrain/objects fix loadsettings
This commit is contained in:
parent
ad26686f85
commit
c41288f607
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -242,7 +242,7 @@ FString ULuckyRobotsGameInstance::GetWriteFolderPath()
|
||||
return WriteFolderPath;
|
||||
}
|
||||
|
||||
TSoftObjectPtr<UStaticMesh> ULuckyRobotsGameInstance::GetRandomMesh()
|
||||
TSoftObjectPtr<UStaticMesh> ULuckyRobotsGameInstance::GetRandomMesh(FTransform& SpawnTransform)
|
||||
{
|
||||
int32 MeshCount = GetCurrentRandomMeshes().Num();
|
||||
if (MeshCount > 0)
|
||||
@ -250,7 +250,19 @@ TSoftObjectPtr<UStaticMesh> ULuckyRobotsGameInstance::GetRandomMesh()
|
||||
int32 RandomIndex = UKismetMathLibrary::RandomIntegerInRange(0, MeshCount - 1);
|
||||
if (GetCurrentRandomMeshes().IsValidIndex(RandomIndex))
|
||||
{
|
||||
return GetCurrentRandomMeshes()[RandomIndex];
|
||||
TSoftObjectPtr<UStaticMesh> randommesh = (GetCurrentRandomMeshes()[RandomIndex]);
|
||||
|
||||
TArray<FSelectableItemData> SelectableItemList = GetSelectableItemList(EItemCategory::Furniture);
|
||||
for (auto SelectableItem : SelectableItemList)
|
||||
{
|
||||
if (SelectableItem.Mesh == randommesh)
|
||||
{
|
||||
SpawnTransform = SelectableItem.Transform;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return randommesh;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,7 +202,7 @@ public:
|
||||
FString GetWriteFolderPath();
|
||||
|
||||
UFUNCTION(BlueprintPure)
|
||||
TSoftObjectPtr<UStaticMesh> GetRandomMesh();
|
||||
TSoftObjectPtr<UStaticMesh> GetRandomMesh(FTransform& SpawnTransform);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "Selectable Items")
|
||||
TArray<FSelectableItemData> GetSelectableItemList(EItemCategory ItemCategory);
|
||||
|
Loading…
x
Reference in New Issue
Block a user