Join the Discord: [ Ссылка ]
In this tutorial, I explain how we can use some dot products and vector math to implement the separating axis theorem ([ Ссылка ]). The separating axis theorem is a popular introductory game physics technique for detecting collisions. Although it is not the most efficient (check out GJK algorithm for a more efficient algorithm [ Ссылка ]), it gets the job done and is easy to intuitively understand. Once we look at how to solve this problem mathematically, we implement it in the code base, and create a function for detecting whether an AABB is colliding with another AABB, or with a Box2D (OBB).
Source Code: [ Ссылка ]
0:00 Intro
1:03 SAT Math
10:35 Coding the SAT
---------------------------------------------------------------------
Website: [ Ссылка ]
Github: [ Ссылка ]
Here are some books I recommend if you want to learn about game engine development more thoroughly. I do not profit off any of these sales, these are just some books that have helped me out :)
My Recommended Game Engine Books:
Game Engine Architecture: [ Ссылка ]
Game Physics Cookbook (Read this before the next physics book): [ Ссылка ]
Game Physics (Ian Millington): [ Ссылка ]
Game Programming Patterns (Free): [ Ссылка ]
My Recommended Beginning Game Programming Books:
JavaScript Game Design: [ Ссылка ]
My Recommended Java Books:
Data Structures/Algorithms: [ Ссылка ]
LWJGL (Free, but I haven't read this thoroughly): [ Ссылка ]
Outro Music: [ Ссылка ]
![](https://s2.save4k.ru/pic/Nm1Cgmbg5SQ/maxresdefault.jpg)