更新 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)
|
if (CutResults.Num() >= 2)
|
||||||
{
|
{
|
||||||
// Replace the original skeletal mesh with the first cut result
|
// 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)
|
// TODO: Handle the second cut result (detached part)
|
||||||
// This would involve creating a new actor with the second mesh
|
// 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)
|
if (CutResults.Num() >= 2)
|
||||||
{
|
{
|
||||||
// Replace the original skeletal mesh with the first cut result
|
// 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)
|
// TODO: Handle the second cut result (detached part)
|
||||||
// This would involve creating a new actor with the second mesh
|
// 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
|
// Create a static mesh component for the organ
|
||||||
UStaticMeshComponent* OrganComponent = NewObject<UStaticMeshComponent>(TargetActor);
|
UStaticMeshComponent* OrganComponent = NewObject<UStaticMeshComponent>(TargetActor, TEXT("PreviewOrganComponent"));
|
||||||
if (!OrganComponent)
|
if (!OrganComponent)
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Warning, TEXT("FLESH: Cannot spawn organ, failed to create static mesh component"));
|
UE_LOG(LogTemp, Warning, TEXT("FLESH: Cannot spawn organ, failed to create static mesh component"));
|
||||||
|
Reference in New Issue
Block a user