Skip to content
Tutorials Center
My learning

Topics

Lesson 15 of 38 ยท Actors and Components

Unreal Collision, Overlap Events and Physics Simulation

Understand Unreal collision: block, overlap and ignore responses, object types and trace channels, presets, hit and overlap events, simulating physics and line traces.

Collision decides what blocks you, what triggers events and what falls through the floor. Unreal's system is flexible but has several moving parts: collision enabled, object type, responses per channel, presets, and two kinds of events (hit and overlap). This lesson shows how they fit together and how to turn on simple physics.

Unreal Engine cannot run on this page, so the editor settings are described and the stand-ins reproduce the response logic.

Collision Enabled

On any primitive component (a mesh, a box), Collision > Collision Enabled has these values:

  • No Collision: ignored by everything.
  • Query Only: used for traces and overlap tests, but does not block physically.
  • Physics Only: part of the physics simulation but ignored by traces.
  • Collision Enabled (Query and Physics): both.

Object types and responses

Each component has an Object Type (what it is) such as WorldStatic, WorldDynamic, Pawn, PhysicsBody, Vehicle, Destructible. Then it has a response to every object type and trace channel:

  • Ignore: it does not see the other at all.
  • Overlap: it passes through but generates an overlap event.
  • Block: it stops the other and generates a hit event.

When two components meet, the result is the weaker of the two responses: two blocks block; block against overlap is an overlap; anything against ignore is ignore.

Python Stand-in: resolving two collision responses

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.

Collision presets

You rarely set responses channel by channel. A Collision Preset is a saved bundle. The common ones:

  • BlockAll: a solid wall.
  • BlockAllDynamic: solid, for moving objects.
  • OverlapAll / OverlapAllDynamic: a trigger zone.
  • NoCollision: decoration.
  • Pawn: for characters.
  • Trigger: overlap with pawns only (used by trigger volumes).
  • Custom...: reveals all individual settings.

Create your own channels in Project Settings > Engine > Collision (up to 18 custom object types and trace channels) when you need rules like "bullets pass through glass but not walls".

Events

  • On Component Hit: two blocking things touch. You get the other actor and the impact point and normal.
  • On Component Begin Overlap / End Overlap: two overlapping components start or stop touching. Set Generate Overlap Events on both.
  • Actor-level versions: Event ActorBeginOverlap, Event Hit and so on.

Typical use: a Box Collision around a pickup; on begin overlap, cast the other actor to your player class, add score, play a sound and destroy the pickup.

Python Stand-in: a box trigger with begin and end overlap

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.

Simulating physics

To let an object fall, roll and collide:

  1. Use a mesh with collision (simple shapes are best).
  2. On the Static Mesh Component set Simulate Physics on, and Mobility to Movable.
  3. Optionally set Mass, Linear/Angular Damping, Enable Gravity and physical material Friction and Restitution (bounciness).

Do the same on the mesh for a rolling ball. Press Play or Simulate and watch it. The engine's physics system is Chaos. For objects moved by game logic rather than physics (doors, platforms), do not simulate physics; move them with code or timelines and use Sweep so they collide.

Useful tools:

  • Add Impulse / Add Force to push simulated bodies.
  • Physics Constraint actors to make hinges and joints.
  • Physical Materials to change friction, bounce and footstep sounds per surface.
  • Show > Collision (or Collision view mode) to see the shapes.
Python Stand-in: a falling, bouncing ball

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.

Line traces

A trace is a ray (or a swept shape) cast through the world that returns the first thing it hits. It is the tool for shooting, interaction ("what am I looking at?"), ground checks and line of sight.

  • Line Trace By Channel (Visibility or Camera channel, or your own), returning Hit Result with the hit actor, location, normal, distance and physical material.
  • Sphere / Box / Capsule Trace for thicker rays.
  • Multi traces return everything along the ray.
  • Enable Draw Debug Type (For One Frame) while developing to see the line.

A common failure: "my overlap never fires". Check that both components have Generate Overlap Events, that collision is enabled, and that the responses are set to Overlap (not Block) for the other object type. Then check Show > Collision.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Component A blocks B, but B overlaps A. What happens?

    The result is the weaker of the two responses, here overlap.
  2. 2. Which events do you use for a pickup trigger?

    A trigger overlaps the player and fires a begin overlap event.
  3. 3. What must you enable to let a mesh fall under gravity?

    Simulate Physics on a movable component with collision makes Chaos drive it.
  4. 4. What is a line trace used for?

    Traces query the world along a ray and return hit information.

Summary

  • Collision settings: Collision Enabled, object type, responses (Ignore, Overlap, Block) and presets.
  • Two components meet with the weaker response; Block gives hit events, Overlap gives overlap events.
  • Simulate Physics makes Chaos move a body; use simple collision shapes.
  • Line traces answer "what is along this ray?".

Next: Blueprint Basics