更新 Source/FLESHEditor/Private/DismembermentExecutor.cpp
This commit is contained in:
@@ -148,7 +148,7 @@ bool UDismembermentExecutor::ApplyCut(const FVector& Location, const FVector& Di
|
||||
if (CutResults.Num() >= 2)
|
||||
{
|
||||
// Replace the original skeletal mesh with the first cut result
|
||||
TargetSkeletalMesh->SetSkeletalMesh(CutResults[0]);
|
||||
TargetSkeletalMesh->SetSkeletalMeshAsset(CutResults[0]);
|
||||
|
||||
// TODO: Handle the second cut result (detached part)
|
||||
// This would involve creating a new actor with the second mesh
|
||||
@@ -171,7 +171,7 @@ bool UDismembermentExecutor::ApplyCut(const FVector& Location, const FVector& Di
|
||||
if (CutResults.Num() >= 2)
|
||||
{
|
||||
// Replace the original skeletal mesh with the first cut result
|
||||
TargetSkeletalMesh->SetSkeletalMesh(CutResults[0]);
|
||||
TargetSkeletalMesh->SetSkeletalMeshAsset(CutResults[0]);
|
||||
|
||||
// TODO: Handle the second cut result (detached part)
|
||||
// This would involve creating a new actor with the second mesh
|
||||
@@ -326,7 +326,7 @@ bool UDismembermentExecutor::SpawnOrgan(UStaticMesh* OrganMesh, UMaterialInterfa
|
||||
}
|
||||
|
||||
// Create a static mesh component for the organ
|
||||
UStaticMeshComponent* OrganComponent = NewObject<UStaticMeshComponent>(TargetActor);
|
||||
UStaticMeshComponent* OrganComponent = NewObject<UStaticMeshComponent>(TargetActor, TEXT("PreviewOrganComponent"));
|
||||
if (!OrganComponent)
|
||||
{
|
||||
UE_LOG(LogTemp, Warning, TEXT("FLESH: Cannot spawn organ, failed to create static mesh component"));
|
||||
|
Reference in New Issue
Block a user