aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_castray_loop.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-02 16:16:45 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-02 16:16:45 +0200
commitf922d1ed3235e3ce61c4e74420ae31354eb829d9 (patch)
treefaa1bea9c60dbbf79b91dded0ce9ef1afd552357 /src/ft_castray_loop.c
parentCorrect ray_pos (diff)
download42-cub3d-f922d1ed3235e3ce61c4e74420ae31354eb829d9.tar.gz
42-cub3d-f922d1ed3235e3ce61c4e74420ae31354eb829d9.tar.bz2
42-cub3d-f922d1ed3235e3ce61c4e74420ae31354eb829d9.tar.xz
42-cub3d-f922d1ed3235e3ce61c4e74420ae31354eb829d9.tar.zst
42-cub3d-f922d1ed3235e3ce61c4e74420ae31354eb829d9.zip
Revert this if needed, still sprites and collision to do
Diffstat (limited to 'src/ft_castray_loop.c')
-rw-r--r--src/ft_castray_loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ft_castray_loop.c b/src/ft_castray_loop.c
index 167ee1d..00cb589 100644
--- a/src/ft_castray_loop.c
+++ b/src/ft_castray_loop.c
@@ -47,7 +47,7 @@ void
pl->cam_x = 2 * i / (float)(wl->x_size) - 1;
cl->rlist.y_ray_pos = pl->pos_y;
cl->rlist.x_ray_pos = pl->pos_x;
- cl->rlist.y_ray_dir = pl->dir_y + pl->plane_x *
+ cl->rlist.y_ray_dir = -pl->dir_y + pl->plane_x *
pl->cam_x;
cl->rlist.x_ray_dir = pl->dir_x + pl->plane_y *
pl->cam_x;