Skip to content
Snippets Groups Projects
Commit dcde2f70 authored by David Gilbert's avatar David Gilbert :bug:
Browse files

fix: Prevents collision with cave overlay

parent f275c189
Branches
No related tags found
No related merge requests found
Pipeline #398639 passed
No preview for this file type
No preview for this file type
......@@ -33,7 +33,7 @@ UStaticMeshComponent* ACAVEOverlayController::CreateMeshComponent(const FName& N
UStaticMeshComponent* Result = CreateDefaultSubobject<UStaticMeshComponent>(Name);
Result->SetupAttachment(Parent);
Result->SetVisibility(false);
Result->SetCollisionProfileName(UCollisionProfile::NoCollision_ProfileName);
Result->SetCollisionEnabled(ECollisionEnabled::NoCollision);
return Result;
}
......@@ -235,10 +235,13 @@ void ACAVEOverlayController::BeginPlay()
MC && MC->MotionSource != EName::None)
{
// Create new static mesh for them
auto* SignStaticMeshComp = NewObject<UStaticMeshComponent>();
auto* SignStaticMeshComp = NewObject<UStaticMeshComponent>(this);
SignStaticMeshComp->SetStaticMesh(SignStaticMesh);
SignStaticMeshComp->SetupAttachment(RootComponent);
SignStaticMeshComp->RegisterComponent();
AddInstanceComponent(SignStaticMeshComp);
SignStaticMeshComp->SetCollisionEnabled(ECollisionEnabled::NoCollision);
MotionControllers.Add(MC);
SignsStaticMeshComponents.Add(SignStaticMeshComp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment