Answer the question
In order to leave comments, you need to log in
Why do stripes appear on a UE4 C++ object?
Stripes appear on the object when approaching the surface, if it is added via c ++. How to fix it?
Object code:
#include "Runtime/CoreUObject/Public/UObject/ConstructorHelpers.h"
#include "Components/BoxComponent.h"
#include "PortalIn.h"
APortalIn::APortalIn()
{
PortalIn = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("PortalIn"));
PortalIn->SetupAttachment(RootComponent);
static ConstructorHelpers::FObjectFinder<UStaticMesh> PortalIn_Mesh(TEXT("StaticMesh '/Game/StarterMap/Shapes/PortalIn.PortalIn'"));
PortalIn->SetStaticMesh(PortalIn_Mesh.Object);
PortalIn->SetRelativeLocation(FVector(0.0f, 0.0f, 0.0f));
PortalIn->SetWorldScale3D(FVector(1.0f));
PrimaryActorTick.bCanEverTick = true;
}
void APortalIn::BeginPlay()
{
Super::BeginPlay();
}
void APortalIn::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}
Answer the question
In order to leave comments, you need to log in
To solve this problem, in the settings of the Transform object, the Mobility parameter must be set to Static.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question