TangibleCharacter can now be loaded and moved
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user