plr start on middle of a cell, and wall height is well proportionned

This commit is contained in:
hugogogo
2022-04-30 12:09:44 +02:00
parent 58b862ce82
commit 888fa7c116
7 changed files with 26 additions and 111 deletions

View File

@@ -47,7 +47,7 @@ void plr_turn_left(t_plr *plr)
if (plr->rot == -180)
(plr->rot) *= -1;
(plr->rot)--;
plr->rot -= plr->deg;
// calculate trigo for rotations
radi = plr->rot * M_PI / 180;
radj = radi + (M_PI / 2);
@@ -64,7 +64,7 @@ void plr_turn_right(t_plr *plr)
if (plr->rot == 180)
(plr->rot) *= -1;
(plr->rot)++;
plr->rot += plr->deg;
// calculate trigo for rotations
radi = plr->rot * M_PI / 180;
radj = radi + (M_PI / 2);