diff --git a/raycastlib.h b/raycastlib.h index a106c03..8ad02e8 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -1220,7 +1220,7 @@ Unit coordStep = 1; // draw floor p.isWall = 0; - p.depth = _middleRow * _horizontalDepthStep; + p.depth = (_middleRow - y) * _horizontalDepthStep; while (y < _camera.resolution.y) {