Game Development Reference
In-Depth Information
Figure 13.5 How time can affect collision detection.
if (move.x>0){
bbmin.x -= move.x;
}else{
bbmax.x += move.x;
}
if (move.y>0){
bbmin.y -= move.y;
}else{
bbmax.y += move.y;
}
if (move.z){
bbmin.z -= move.z;
}else{
bbmax.z += move.z;
}
This is such a simple fix that it is recommended that time is always
considered. We will explore techniques for getting more accurate collision
results in more detail in a later section.
Search Nedrilad ::




Custom Search