---
title: "Contact Recycling"
description: "Contact recycling reuses one-shot contact manifolds across full time steps when two bodies have barely moved relative to each other, making narrow-phase contact generation nearly free for resting stacks or objects riding together."
url: "https://swe.quest/articles/contact-recycling-cff69228db371637"
canonical: "https://box2d.org/posts/2026/10/contact-recycling/"
source: "Box2D"
published: "2026-10-12"
difficulty: "hard"
kind: "Deep dive"
reading_minutes: 9
tags: ["gaming","performance","algorithms","scientific-computing"]
---

# Contact Recycling

A post on [Box2D](https://swe.quest/sources/box2d.md), published 2026-10-12, 9 min read, Deep dive. Original: [https://box2d.org/posts/2026/10/contact-recycling/](https://box2d.org/posts/2026/10/contact-recycling/)

## Summary

Contact recycling reuses one-shot contact manifolds across full time steps when two bodies have barely moved relative to each other, making narrow-phase contact generation nearly free for resting stacks or objects riding together. A conservative-advancement-style bound combining translation and small-angle rotation times max extent measures relative movement against a cached relative transform. The key addition is updating each contact point's separation from a cached base separation using current body rotations, with the normal and anchor directions held fixed in world space. This permits tolerances of several centimeters while improving stacking stability. The technique needs one-shot, cached manifolds, has since been adopted by Avian and Rapier, and may resemble a legacy PhysX contact cache path.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Games](https://swe.quest/tags/gaming.md) (Domains)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Algorithms](https://swe.quest/tags/algorithms.md) (Architecture & design)
- [Scientific computing](https://swe.quest/tags/scientific-computing.md) (Domains)

## Prerequisites

- rigid body physics simulation ([easy posts on Scientific computing](https://swe.quest/tags/scientific-computing.md?difficulty=easy))
- contact manifolds
- GJK and SAT collision detection
- constraint solvers

## Keywords

Box2D, Box3D, Conservative Advancement, PhysX, Bepu Physics, Rapier, Avian, GJK

## Related posts

- [Box2D 3.2](https://swe.quest/articles/box2d-3-2-6bf0b6359f7de39c.md): Box2D · 2026-10-18 · Easy · 2 min read · Games, Performance engineering, C & C++
  Box2D 3.2 runs roughly three times faster than 3.1, with the speedup broken down by source: contact recycling (~40%), solver algorithm refinement (~20%), AVX2 runtime dispatch (~15%), solver optimization (~10%) and broad-phase optimization (~10%), which compound multiplicatively.
- [Inscribed Spheres](https://swe.quest/articles/inscribed-spheres-119dd641a396418e.md): Box2D · 2026-09-29 · Hard · 14 min read · Games, Algorithms, Performance engineering, C & C++
  Inscribed spheres give a cheap upper bound on the separation achievable along any axis in the separating axis test (SAT): n·d − (rA + rB), where d joins the sphere centers.
- [Understanding Garbage Collection in JavaScriptCore From Scratch](https://swe.quest/articles/understanding-garbage-collection-in-javascriptcore-from-scratch-6bc19cc2aad39444.md): WebKit · 2022-07-29 · Hard · 52 min read · Memory management, Runtimes & VMs, JavaScript, Concurrency
  JavaScriptCore's garbage collector is non-compacting, generational and mostly concurrent, with heavy use of lock-free programming.
- [Introducing Kaboom](https://swe.quest/articles/introducing-kaboom-7829faa4b8e236ed.md): Replit · 2021-04-06 · Medium · 4 min read · Games, JavaScript, Developer tools
  Kaboom is a JavaScript game library from Replit aimed at beginners and intermediate programmers.
- [Behind the build: 2025's BFCM globe in a pinball machine 🌎🕹️](https://swe.quest/articles/behind-the-build-2025-s-bfcm-globe-in-a-pinball-machine-31ac98f2441d854c.md): Shopify Engineering · 2025-12-03 · Medium · 16 min read · Frontend, React, Performance engineering, Games, Real-time systems
  Shopify's 2025 BFCM live globe was embedded in a browser pinball game built with three.js and react-three-fiber, streaming real merchant orders via server-sent events and reacting to sales milestones and first sales.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
