UnrealScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a plane with only one wing"
// Create a Plane with only one Wing APlane::APlane() { PrimaryActorTick.bCanEverTick = true; StaticMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Static Mesh Component")); RootComponent = StaticMeshComponent; LeftWing = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Left Wing")); LeftWing->SetupAttachment(RootComponent); RightWing = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Right Wing")); RightWing->SetupAttachment(RootComponent); // Set the right wing to be invisible RightWing->SetVisibility(false); }