Skip to content
Tutorials Center
My learning

Topics

Lesson 12 of 38 ยท Actors and Components

Unreal Components: Scene, Mesh, Light and Attachment Hierarchy

Learn how Unreal actors are built from components: Scene and Primitive components, the root component, attaching children, common component types and component tags.

An actor is a container. The things inside it that give it a shape, a light, a sound or a behavior are components. This composition model replaces deep inheritance: instead of writing a FlamingBarrel class that inherits everything, you take an actor and add a mesh component, a fire particle component and a sound component. This lesson shows how components fit together.

Unreal Engine cannot run on this page, so the editor steps are described in words and the stand-ins model the hierarchy in Python.

Component types

Components come in three families:

  • Actor Component (UActorComponent): behavior only, with no position. Example: a health system, an inventory.
  • Scene Component (USceneComponent): has a transform and can be attached to other scene components. Example: a plain Scene (an empty pivot), an arrow, a camera, an audio source.
  • Primitive Component (UPrimitiveComponent): a scene component that is drawn or collides. Example: Static Mesh, Skeletal Mesh, Box / Sphere / Capsule Collision, Text Render, Particle / Niagara.

Typical components you will add:

Component Purpose
Static Mesh A 3D model that does not deform
Skeletal Mesh An animated, bone-driven model
Box / Sphere / Capsule Collision and overlap volumes
Point / Spot / Directional Light Light sources
Camera and Spring Arm A view, and a boom that keeps it behind a character
Audio Plays a sound in 3D
Niagara System Particle effects
Character Movement Walking, jumping, falling
Projectile Movement Moves a bullet with speed and gravity
Widget A UI element in the 3D world

The root component and attachment

Every actor needs one root component. It defines the actor's location in the world; moving the actor moves the root. Other scene components are attached to the root or to each other, forming a tree. A child's transform is relative to its parent, so moving the parent moves the children along.

flowchart TD
  R["Root: Capsule (collision)"] --> M["Skeletal Mesh"]
  R --> SA["Spring Arm"]
  SA --> CAM["Camera"]
  M --> W["Weapon socket"]

A third-person character: the camera hangs off a spring arm attached to the root capsule.

The world transform of a child is its parent's world transform combined with its own relative transform. The stand-in below uses only translation, to keep the idea clear.

Python Stand-in: world position from a component tree

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Working with components in the editor

Select an actor in the level. In the Details panel the Components section lists its tree. You can:

  • click a component to edit its own properties (material, collision, light color);
  • Add a component with the green button, then drag it onto another to attach it;
  • rename a component (F2) and use Set as Root by drag-dropping it on the root;
  • hide or disable components without deleting them.

In a Blueprint editor (a later lesson), the Components panel does the same and is where you design reusable actors.

Sockets

A socket is a named attachment point on a mesh (for example hand_r on a character). You attach a sword to the hand_r socket and it follows the hand through every animation. Create sockets in the Static or Skeletal Mesh editor under Socket Manager.

Mobility, visibility and collision per component

Each primitive component has its own:

  • Mobility (Static, Stationary, Movable): a child cannot be more static than needed; a movable actor needs movable components.
  • Visibility and Hidden in Game.
  • Collision Presets (next lessons).
  • Cast Shadow, Render in Main Pass and more.
Python Stand-in: a component bag (composition instead of inheritance)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Actor components for reusable behavior

If you write the same logic for several actors (health, interaction, inventory), put it in an Actor Component with no transform. Any actor can then add that component, and the code lives in one place. In a Blueprint: Add > Actor Component > Blueprint Actor Component. This is the preferred pattern over copying logic.

Choose a component type deliberately. If the behavior has a position in space (a light, a camera), it is a Scene Component. If it is just logic (health), use an Actor Component so it does not carry an unused transform.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What does the root component define?

    The root component's transform is the actor's transform.
  2. 2. Which component type has behavior but no transform?

    An Actor Component holds logic only and cannot be attached in space.
  3. 3. What is a socket?

    A socket such as hand_r lets you attach items that follow an animated bone.
  4. 4. A child component's transform is relative to its:

    Attached components move with their parent; their own transform is local to it.

Summary

  • Actors are built from components: Actor (logic), Scene (transform) and Primitive (drawn or colliding).
  • The root component sets the actor's place; children attach to it and move with it.
  • Sockets attach items to bones or mesh points.
  • Reusable logic belongs in Actor Components.

Next: Transforms, Rotators and Vectors