hit.normal.y = 0;
} else {
if(movement.y > -DELTA && movement.y < DELTA) {
- return false;
+ hit.time = 0;
+ hit.depth = 0;
+ hit.normal.x = 1;
+ hit.normal.y = 0;
+ return true;
}
hit.time = FLT_MAX;
}
return false;
float time = depth / -(normal * movement);
if(time < hit.time) {
- printf("Time: %f.\n", time);
hit.depth = depth;
hit.time = time;
hit.normal = normal;