Skip to content

Instantly share code, notes, and snippets.

@erincatto
Created February 11, 2026 22:18
Show Gist options
  • Select an option

  • Save erincatto/3f84e1877029f334e9b2f380bdb00dca to your computer and use it in GitHub Desktop.

Select an option

Save erincatto/3f84e1877029f334e9b2f380bdb00dca to your computer and use it in GitHub Desktop.
Compound Shapes

Imagine you are playing an open world game, like the Witcher. You ride your beautiful white steed towards the town with your hair blowing in the wind. But now your game hitches because it is loading 50k separate collision shapes for the town into the broad-phase, one-by-one. Your hair is no longer flowing and you quit the game because the stuttering sucks.

Now imagine the physics programmer created a mid-phase for those 50k shapes offline and put them all into one collision asset that gets loaded in the background. Then when you approach the town there is no hitching and your hair continues to nicely blow in the wind and you keep playing the game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment