sphere

Sphere vs AABB collision detection test

As the sphere is being the simplest primitive there is, the test for Sphere and AABB intersection is easy. This solution works also for Sphere Cube intersection tests.

Basic primitives

Introduction

When you want to do real time computer physics, like what we see in games, you will have to break the world into understandable items. It’s like Caesar’s divide and conquer tactic. When you are playing in a complex scene, all what really goes on in the physics engine is broken into small, but many pieces. This enables further optimization down the line, which will be covered later, but for now this keeps the collision detection and collision response algorithms easy to understand.