Blueprint Basics · Easy · 16 min

Make a Collectible: Overlap, Pick It Up, and Score

Add a collision sphere, fire On Component Begin Overlap, check it's the player, then Destroy Actor and add to a score — your first real piece of interactive gameplay, built from a handful of nodes.

LevelEasy Time~16 min EngineUE 5.4+ Hands-on18 checkpoints

Before this: What Is a Blueprint? Create Your First One (No Code Required), Event Graph Basics: BeginPlay, Nodes, and Wires Explained, Blueprint Variables: Store and Change Values to Drive Behaviour

By the end, you'll be able to
  • Add a Sphere (or Box) Collision component to an Actor and set it as a trigger
  • Respond to On Component Begin Overlap and confirm it was the player
  • Destroy the Actor and increment a score variable when it's collected
  • Explain the real difference between an overlap and a hit

The moment a level becomes a game

So far your Blueprints have done things on their own — printed on BeginPlay, spun forever, changed a variable. This lesson is the leap to interactive: an object that reacts to the player walking into it. That's the heart of almost every game, from picking up a coin to opening a door to stepping on a trap.

We'll build a classic collectible pickup. You'll give it an invisible bubble of collision, listen for the player entering that bubble, make sure it really was the player (and not a stray box), then make the pickup disappear and bump a score up by one. It sounds like a lot, but it's genuinely just a few nodes — and once you've built one trigger, you've built them all.

Four terms to lock in first

Tap a card to flip it

Overlap vs hit — get this clear before you build

Beginners mix these two up constantly, and it causes hours of confusion, so let's nail it now. An overlap is when objects are allowed to pass through one another, and the engine simply tells you 'hey, these two are touching'. The player walks right into the coin — nothing stops them — and you get an On Component Begin Overlap event you can react to. That is exactly what a pickup, a trigger volume, or a checkpoint wants.

A hit (also called a block) is a solid, physical collision: the two objects refuse to pass through each other. Walk into a wall and you stop — that's a blocking hit, and it fires an On Component Hit event instead. If you accidentally set your pickup to 'Block', the player will thud into an invisible wall instead of collecting it, and your overlap event will never fire. So the golden rule for a pickup is: set the collision to Overlap, not Block.

Before you build

Tick these so the overlap actually fires — most 'it doesn't work' problems are one of these:

  • A project with a player character — the Third Person template is perfect (it gives you BP_ThirdPersonCharacter to collect with)
  • A Blueprint Actor for your pickup with a visible mesh (a coin, gem, or even a simple Sphere mesh will do)
  • The pickup Actor placed in the level, sitting where the player can walk into it
  • Five quiet minutes — there's one collision setting that catches everyone, and we'll flag it

Build the pickup, step by step

Open your pickup Blueprint (or create one: right-click in the Content Browser, Blueprint Class, Actor). Add a mesh so you can see it, then follow along. Tick each step as you go.

  1. 1Add a Sphere Collision component

    In the Blueprint editor, look at the Components panel (top-left). Click the green 'Add' button, search for 'Sphere Collision', and add it. A Box Collision works just as well — pick the shape that best wraps your pickup.

    Select the new Sphere Collision and, in the Details panel, drag its Sphere Radius up until the bubble comfortably surrounds your pickup mesh. This bubble is the area the player has to enter to collect it.

    TipMake the sphere a little bigger than the visible mesh. A slightly generous trigger feels better to play than one the player has to hit pixel-perfectly.

  2. 2Set the collision to Overlap, not Block

    With the Sphere Collision selected, scroll the Details panel to the 'Collision' section. Set its 'Collision Presets' to 'OverlapAllDynamic' (or 'Trigger'). This tells it: detect things passing through me, but don't physically stop them.

    Confirm 'Generate Overlap Events' is ticked on this component — without it, the engine never reports the overlap and your event simply won't fire.

    TipIf you used a separate mesh for visuals, set THAT mesh's collision to 'NoCollision' or 'OverlapAllDynamic' too — a mesh left on 'Block' will stop the player short of the trigger.

  3. 3Add the On Component Begin Overlap event

    Still selected on the Sphere Collision, look at the bottom of its Details panel for the 'Events' section, and click the green '+' next to 'On Component Begin Overlap'. This drops a matching red event node into your Event Graph.

    This event fires the instant something enters the sphere. It hands you several outputs — the most important is 'Other Actor', which is whatever just walked in.

    TipYou can also right-click in the Event Graph and search 'On Component Begin Overlap (Sphere)' to add it, but the Details-panel '+' button is the foolproof way to wire it to the right component.

  4. 4Check it was actually the player

    Drag a wire from the 'Other Actor' output and search for 'Cast to BP_ThirdPersonCharacter' (your project's player class). The Cast node asks 'is this the player?' — if yes, execution continues out of its top pin; if no, it quietly stops there.

    This check matters: without it, ANY Actor touching the sphere — a falling crate, another pickup — would trigger collection. The cast guarantees only the player collects it.

    TipNot sure of your player's class name? Open the level, click the character, and read the class at the top of its Details panel — that's the class to cast to.

  5. 5Add to the score variable

    First make a score to add to. In a sensible place — often the player, the Game Mode, or for now an integer variable here — create an Integer variable called 'Score'. From the successful (top) pin of your Cast, get the Score, add 1 with a '+' node, and Set it back.

    If your Score lives on another Blueprint (like the player), drag from the Cast's blue return pin to reach that Blueprint's Score variable directly — the Cast already gave you a reference to the player.

    TipKeeping the score on the player or Game Mode (rather than on the pickup) means it survives after the pickup is destroyed — which it's about to be.

  6. 6Destroy the pickup and play

    From the Set Score node, drag a wire and add a 'DestroyActor' node. Leave its 'Target' as 'self' (the default) so the pickup removes itself. Now the coin vanishes the moment it's collected.

    Compile, Save, then press Play and walk your character into the pickup. It should disappear, and your score should go up by one. You just built real gameplay.

    TipDestroyActor with 'self' as the target is the standard 'consume me' pattern for pickups, projectiles and one-shot effects. Order matters — add to the score BEFORE you destroy the actor.

Why bother with the Cast to the player at all? Why not just Destroy and add score the moment ANYTHING overlaps?

Sphere or Box? And the C++ equivalent

Sphere Collision is the easiest for a round-ish pickup — one radius value and you're done, and it has no awkward corners. Reach for it for coins, gems, orbs and most floating collectibles.

Box Collision suits doorways, pressure plates, room-shaped trigger zones and anything rectangular. It's the same workflow — add it, set it to overlap, use its On Component Begin Overlap. The shape is the only real difference; the events are identical.

The overlap callback in C++ (for reference)

cpp
// In the constructor: make the sphere generate overlap events and bind the callback.
Sphere->SetCollisionProfileName(TEXT("OverlapAllDynamic"));
Sphere->OnComponentBeginOverlap.AddDynamic(this, &APickup::OnOverlap);

void APickup::OnOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor,
                        UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
                        bool bFromSweep, const FHitResult& Sweep)
{
    // The cast IS the "is it the player?" check. Nullptr means it wasn't.
    if (AMyCharacter* Player = Cast<AMyCharacter>(OtherActor))
    {
        Player->Score += 1;   // add to the score first...
        Destroy();            // ...then remove the pickup
    }
}
The same pickup logic in C++: bind the overlap delegate, then on the player, add score and destroy. You don't need this to follow the lesson — it just shows the Blueprint nodes have a 1:1 C++ shape.

QuizCheck yourself

1For a coin the player walks into and collects, the collision should be set to…

2What is the job of the 'Cast to BP_ThirdPersonCharacter' node in the pickup graph?

3You walk into the pickup and absolutely nothing happens. The first thing to check is…

ChallengeTry it yourself

Place three coins in the level and make each one add to the SAME score, so collecting all three reads 3 — not three separate '1's. Then, as a stretch, print the running total to the screen each time you collect one.

Hint 1

For one shared total, the Score variable must live somewhere there's only one of — the player character or the Game Mode — NOT on each pickup (each coin would have its own private Score).

Hint 2

Each coin's overlap graph should reach OUT to that single shared Score: cast to the player, then get/add/set the player's Score (or get the Game Mode and set its Score).

Hint 3

To show the total, drag from your Set Score and add a 'Print String' node, plugging the new score into its 'In String' input (use a 'To Text (Integer)' or append node so it prints as text).

Handy Blueprint-editor shortcuts

  • F7 Compile the current Blueprint (same as the Compile button)
  • Ctrl S Save the Blueprint after compiling
  • Alt P Play In Editor — drop in and walk into your pickup to test it
  • Right-click drag Pan around the Event Graph to reach off-screen nodes

You can now

Tick these off — this is a genuine gameplay milestone:

  • Add a Sphere or Box Collision component and size its trigger zone
  • Set a collision component to overlap and enable overlap events
  • Respond to On Component Begin Overlap and read the 'Other Actor'
  • Cast to the player to confirm who entered, then add score and Destroy Actor
  • Explain the difference between an overlap and a blocking hit
Finished the steps?

Mark this lesson complete

We'll remember it on your Academy page and unlock the next lesson below.

Next lesson →Debug Blueprints: Print String, Breakpoints, and Watching Values

Questions beginners ask

What's the real difference between an overlap and a hit?

An overlap lets two objects pass through each other and reports the contact (On Component Begin Overlap) — perfect for pickups, triggers and checkpoints, where nothing should be blocked. A hit is a solid, blocking collision where the objects stop each other (On Component Hit), like the player walking into a wall. A pickup must use overlap; if you set it to 'Block' you'll bump into an invisible wall and no overlap event fires.

I walk into the coin and nothing happens. What's wrong?

It's almost always collision settings. Make sure the trigger component's preset is an overlap/trigger one (not 'Block'), that 'Generate Overlap Events' is ticked on it, and that the player capsule also generates overlap events (the Third Person template's already does). If a separate visual mesh is set to 'Block', it can stop the player before they reach the trigger — set that mesh to overlap or no collision too.

Where should the Score variable live?

Not on the pickup itself — each pickup is its own object and is destroyed on collection, so a Score there can't be shared or survive. Keep the running total on something there's only one of: the player character (handy if score follows the player) or the Game Mode (handy for level-wide totals). Each pickup then reaches out to that single shared variable to add to it.

Do I have to use a Sphere Collision, or can I use a Box?

Either works — the workflow is identical. Use a Sphere for round-ish pickups like coins and gems (one radius, no corners), and a Box for doorways, pressure plates and room-shaped trigger zones. The On Component Begin Overlap event behaves the same regardless of the shape.

Get the next lessons as they land

New Academy lessons, UE5 tips and tool releases — straight to your inbox. No spam, unsubscribe anytime.

Report a bug