From 622c2a24861a2f6fca5b2c5354005f31a26d2f3c Mon Sep 17 00:00:00 2001 From: jyelon Date: Tue, 30 Jan 2024 13:06:10 -0500 Subject: [PATCH] TangibleCharacter can now be loaded and moved --- Content/Tangibles/TangibleCharacter.uasset | 4 ++-- Content/Tangibles/TangibleStaticMesh.uasset | 4 ++-- Source/Integration/Tangible.cpp | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Content/Tangibles/TangibleCharacter.uasset b/Content/Tangibles/TangibleCharacter.uasset index 6806352e..6be1c082 100644 --- a/Content/Tangibles/TangibleCharacter.uasset +++ b/Content/Tangibles/TangibleCharacter.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:3e66679bb7d9d098c72ea671e0d7ccb1ae9fb8dc1f4f3c5965afe0fd5f0a5f88 -size 362759 +oid sha256:345c1b7c80601c7caef65b5d751bd9cb46258a26b8a05c5f69a69048cad462d3 +size 441630 diff --git a/Content/Tangibles/TangibleStaticMesh.uasset b/Content/Tangibles/TangibleStaticMesh.uasset index 506e4679..59012523 100644 --- a/Content/Tangibles/TangibleStaticMesh.uasset +++ b/Content/Tangibles/TangibleStaticMesh.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4bc59c810eb1238fced003e1164228955d5feea34c962f7124aa9b45d2ead461 -size 277010 +oid sha256:d78f64dc83ff5c8af82e5c62f79f247b62c793585e747e9e735abcfa157f09da +size 272176 diff --git a/Source/Integration/Tangible.cpp b/Source/Integration/Tangible.cpp index ede168be..100f19aa 100644 --- a/Source/Integration/Tangible.cpp +++ b/Source/Integration/Tangible.cpp @@ -22,6 +22,7 @@ void UlxTangible::Init(UlxTangibleManager* tm, int64 id) TangibleId = id; } +#pragma optimize("", off) void UlxTangible::SetActorBlueprint(const FString &name) { // If we're already of the right class, do nothing. if (ActorBlueprintName == name) { @@ -63,7 +64,9 @@ void UlxTangible::SetActorBlueprint(const FString &name) { FVector location(0, 0, 0); FRotator rotation(0, 0, 0); UWorld* w = Manager->GetWorld(); + params.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn; AActor* a = w->SpawnActor(blueprint, &location, &rotation, params); + check(a != nullptr); // Insert a TangibleComponent into the actor. UActorComponent* ac = a->AddComponentByClass(UlxTangibleComponent::StaticClass(), false, FTransform::Identity, false);