更新 Source/FLESH/Private/BloodSystem.cpp
This commit is contained in:
@@ -151,7 +151,7 @@ UDecalComponent* UBloodSystem::ApplyBloodDecal(UPrimitiveComponent* Component, c
|
|||||||
FRotator Rotation = (-Direction).Rotation();
|
FRotator Rotation = (-Direction).Rotation();
|
||||||
|
|
||||||
// Create the decal component
|
// Create the decal component
|
||||||
UDecalComponent* DecalComponent = NewObject<UDecalComponent>(Component);
|
UDecalComponent* DecalComponent = NewObject<UDecalComponent>(Component, TEXT("BloodDecalComponent"));
|
||||||
DecalComponent->SetupAttachment(Component);
|
DecalComponent->SetupAttachment(Component);
|
||||||
DecalComponent->SetRelativeLocation(Component->GetComponentTransform().InverseTransformPosition(Location));
|
DecalComponent->SetRelativeLocation(Component->GetComponentTransform().InverseTransformPosition(Location));
|
||||||
DecalComponent->SetRelativeRotation(Component->GetComponentTransform().InverseTransformRotation(Rotation.Quaternion()));
|
DecalComponent->SetRelativeRotation(Component->GetComponentTransform().InverseTransformRotation(Rotation.Quaternion()));
|
||||||
|
Reference in New Issue
Block a user