Game Development Reference
In-Depth Information
Problems with axis-aligned bounding boxes and
bounding spheres
The problem with axis-aligned bounding boxes and spheres is easily
identified: accuracy. Collision detection accuracy is poor because the test
areas do not conform accurately to the target geometry.
Figure 13.4 Problems with AABBs.
Figure 13.4 illustrates the problem. The bounding box between the
character and the set is going to report a collision when clearly none has
occurred. Now one approach is to have more and more bounding boxes,
but at some stage you will be adding to the problem rather than simplifying
it. Another approach is to use bounding boxes to get an indication whether
a collision has occurred and if this is the case to analyse the collision in
more detail. We will look at this further in a later section.
Another problem involves the fourth dimension of time. If the movement
vector on a character is large, then it is possible that in a single move the
character has hit and gone through an obstacle yet no collision is reported
because at both the time positions calculated, no collision occurred.
Fortunately, this problem is easy to fix. If your character has a
movement vector then this can be used to create a combined bounding
box for the current time increment and the previous time increment.
Search Nedrilad ::

Custom Search