I want to build a simple actor with 2 cube meshs and track the hits on each cube.
When creating a new Actor based class, with 2 UStaticMeshComponent variables
.h file:
public:
UPROPERTY(VisibleAnywhere)
UStaticMeshComponent* cube0;
UPROPERTY(VisibleAnywhere)
UStaticMeshComponent* cube1;
.cpp file:
// within the constructor function
cube0 = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("cube0"));
cube1 = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("cube1"));
this actually crushes unreal editor (latest), can an actor have 2 static mesh components?
How can I create an actor with 2 mesh objects?
How should I implement the two different hit boxes for the two components?