Uploaded September 2018 | Updated November 2026, 7 hours ago
A key issue in any physics (or interaction) engine is how to quickly determine what is/isn't intersecting. That's where the simple classic sort & sweep algorithm comes into play. We talk about how the algorithm works, why it's effective, and set up the framework for implementing it.
Starting code: github.com/BennyQBD/3DGameProgrammingTutorial/tree/c49a0141c0cd88cebf6c7564ce6b17dade0d67d6
Finished code: github.com/BennyQBD/3DGameProgrammingTutorial/tree/9d776001a56e1d5b5252da825ce893778d52f249
Line-by-line code change breakdown: github.com/BennyQBD/3DGameProgrammingTutorial/commit/9d776001a56e1d5b5252da825ce893778d52f249
Base code: github.com/BennyQBD/CGFX5
Discord: discord.gg/aMqvk3E
If you'd like early access to videos, special discord roles, or just to support the creation of these videos. consider becoming a patron on Patreon: patreon.com/thebennybox
A very special thanks to my most devoted supporters for making this video possible:
Thundzz (Yacine)
Andreas Nordh
ExemptAK
zatrik
matthew motsinger
Galymzhan Sh
Jonas Svedberg
Walter Cardozo
Mel Florance
A key issue in any physics (or interaction) engine is how to quickly determine what is/isn't intersecting. That's where the simple classic sort & sweep algorithm comes into play. We talk about how the algorithm works, why it's effective, and set up the framework for implementing it.
Starting code: github.com/BennyQBD/3DGameProgrammingTutorial/tree/c49a0141c0cd88cebf6c7564ce6b17dade0d67d6
Finished code: github.com/BennyQBD/3DGameProgrammingTutorial/tree/9d776001a56e1d5b5252da825ce893778d52f249
Line-by-line code change breakdown: github.com/BennyQBD/3DGameProgrammingTutorial/commit/9d776001a56e1d5b5252da825ce893778d52f249
Base code: github.com/BennyQBD/CGFX5
Discord: discord.gg/aMqvk3E
If you'd like early access to videos, special discord roles, or just to support the creation of these videos. consider becoming a patron on Patreon: patreon.com/thebennybox
A very special thanks to my most devoted supporters for making this video possible:
Thundzz (Yacine)
Andreas Nordh
ExemptAK
zatrik
matthew motsinger
Galymzhan Sh
Jonas Svedberg
Walter Cardozo
Mel Florance










