DEV Community

Thomas Poli
Thomas Poli

Posted on

How Game Engines Handle Physics: A Beginner's Primer

Ever watched a character ragdoll through a wall or a crate launch into orbit? Those are physics systems doing exactly what they were told. Here's how it works under the hood.

What "physics" means in a game engine

Mostly rigid body dynamics, handled by a physics engine — Unity uses PhysX-based solutions, Unreal uses Chaos, Godot ships its own solver.

Rigidbodies: the building blocks

A rigidbody bundles mass, velocity, drag and gravity response. Dynamic bodies are fully simulated; kinematic bodies move only when code moves them. See this UK gaming resource for more beginner-friendly explainers.

Collision detection in two phases

Broad phase eliminates impossible pairs via bounding boxes or octrees; narrow phase runs precise tests on the rest. Games use simplified invisible collision proxies — most players never notice.

The physics tick

Physics runs on a fixed timestep (typically 50–60/second), decoupled from rendering, so simulation behaves identically at 30fps and 144fps.

Why physics bugs happen

Tunnelling, exploding crates and jittering stacks all come from the solver approximating reality each tick. The bugs are the seams showing.

Top comments (0)