When creating custom Actors from components, it is important to consider the concept of attaching. Attaching components creates a relationship where transformations that are applied to the parent component will also affect the components that are attached to it.
Attaching components to create a hierarchy
How to do it...
- Create a new class derived from the Actor class using the editor and call it HierarchyActor.
- Add the following properties to your new class in the header file (HierarchyActor.h):
UCLASS()
class CHAPTER_04_API AHierarchyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AHierarchyActor();
UPROPERTY(VisibleAnywhere)
USceneComponent* Root...