giovedì 28 luglio 2016

Day 153: Narrow collision detection

After a few days studying octrees, I decided that I will do them later for a few reasons:

- it is a pretty time consuming job, especially to optimize
- it is hard to test, and with a working engine it would be way easier
- the engine will work without them: if I just remove the broad phase collision detection I will get O(n^2) contacts, but otherwise everything will work.

For these reasons I'll implement them when everything will be up and running.
Today I started to work on the narrow phase collision detection, which consists in writing a lot of different collision cases, one for each possible pair of colliders. Today I wrote:

1) Sphere vs sphere
2) Box vs sphere
3) Box vs half plane
4) Sphere vs plane
5) Sphere vs half plane

These are the easier ones, tomorrow I'll get my hands on the separating axis theorem, which should enable to extend to more complex cases, first one being the collision between two boxes.

Nessun commento:

Posta un commento