Thursday, October 07, 2010
Collision detection in 3d games detects whether objects are intersecting. The normal discrete collision detection does so by checking the objects at their current position. Then the game moves the objects and the collision detection checks the objects at their new positions.
This method works for slow moving objects, but for fast moving objects critical collisions can be missed. To detect all collisions we need “Continuous Collision Detection” (CCD), which we will discuss in this and the next blog posts.
A normal game computes 30 or 60 frames per second. In each frame objects are positioned, collisions are detected and the objects are displayed on the screen. Object movement is not really continuous – instead each simulated objects makes 30 or 60 hops per second. In other words: the movement of the objects is sampled with 30 or 60 Hz.
Two unwanted situations can occur:
The following video shows the second problem. Two spheres move towards the wall. The sphere in the front uses discrete collision detection. The collision with the wall is missed because it happens between two frames. The sphere in the back uses Continuous Collision Detection and the collision is detected.
CCD is more difficult than discrete collision detection, but it does two important things:
In the next blog post, we will discuss ways to implement CCD and how we have implemented CCD in the upcoming version of DigitalRune Geometry.
0 comment(s) so far...
A collection of the most useful blog articles can be found here:
(on Documentation page)
DigitalRune is a trademark of Garstenauer Information Technology OG.
Garstenauer Information Technology OG
Weingartenstrasse 35, 4452 Ternberg