Rust Bevy Collision Broadphase
Use this skill to make Bevy collision detection scale without mixing detection,
response, rendering, and gameplay rules into one system.
Core Workflow
- Identify the collision shapes, movement model, entity counts, and layers.
- Keep collider data small and independent from sprites, textures, and game
rules.
- Choose the cheapest broadphase that fits the scene: brute force for tiny
counts, spatial hash for uniform worlds, quad tree for clustered worlds.
- Emit candidate or collision events; let separate systems decide response.
- Test edge contacts, fast movement, layer filters, despawn cases, and
deterministic ordering.
- Benchmark before and after changing the broadphase.
Read Next
| Task |
Load |
| Pick or review a broadphase |
guidelines.md, references/broadphase-patterns.md |
| Optimize an existing collision system |
workflows/optimize-collision.md |
| Route a specific symptom |
guidelines.md |
Source Notes
Guidance is transformed and paraphrased from Herbert Wolverson,
Advanced Hands-On Rust, especially Chapter 8 on obstacles and collision
detection and Chapter 12 on optimization. The examples are original skeletons
intended to preserve the transferable technique, not the book's project code.
1---2name: rust-bevy-collision-broadphase3description: Design and review Bevy 2D collision broadphase systems with AABB bounds, spatial indexes, typed collision events, and benchmark-driven test beds. Use when replacing O(n^2) collision checks, adding spatial partitioning, diagnosing Bevy collision performance, or separating broadphase, narrowphase, and response systems in Rust games.4license: MIT5compatibility: Codex, Claude Code, and other Agent Skills-compatible clients.6metadata:7 source: https://skillmd.com/skills/hashgraph-online/rust-bevy-collision-broadphase8 version: "0.1.0"9 displayName: Rust Bevy Collision Broadphase10 category: Rust11 tags: rust,bevy,gamedev,collision,performance12---1314# Rust Bevy Collision Broadphase1516Use this skill to make Bevy collision detection scale without mixing detection,17response, rendering, and gameplay rules into one system.1819## Core Workflow20211. Identify the collision shapes, movement model, entity counts, and layers.222. Keep collider data small and independent from sprites, textures, and game23 rules.243. Choose the cheapest broadphase that fits the scene: brute force for tiny25 counts, spatial hash for uniform worlds, quad tree for clustered worlds.264. Emit candidate or collision events; let separate systems decide response.275. Test edge contacts, fast movement, layer filters, despawn cases, and28 deterministic ordering.296. Benchmark before and after changing the broadphase.3031## Read Next3233| Task | Load |34|------|------|35| Pick or review a broadphase | `guidelines.md`, `references/broadphase-patterns.md` |36| Optimize an existing collision system | `workflows/optimize-collision.md` |37| Route a specific symptom | `guidelines.md` |3839## Source Notes4041Guidance is transformed and paraphrased from Herbert Wolverson,42*Advanced Hands-On Rust*, especially Chapter 8 on obstacles and collision43detection and Chapter 12 on optimization. The examples are original skeletons44intended to preserve the transferable technique, not the book's project code.