From 63fff28c5f73c833fdd6c5f1d0fa30dba150390a Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Fri, 14 Feb 2020 19:37:54 +0100 Subject: True [W][A][S][D] --- src/ft_extra_keys.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/ft_extra_keys.c') diff --git a/src/ft_extra_keys.c b/src/ft_extra_keys.c index ebcaf48..79c0ed2 100644 --- a/src/ft_extra_keys.c +++ b/src/ft_extra_keys.c @@ -13,6 +13,7 @@ #include #include #include +#include int ft_left_key(t_cub *clist) @@ -29,6 +30,8 @@ int sav_plane_x = pl->plane_x; pl->plane_x = pl->plane_x * cos(rot_speed) - pl->plane_y * sin(rot_speed); pl->plane_y = sav_plane_x * sin(rot_speed) + pl->plane_y * cos(rot_speed); + printf("dir_x> %f\n", pl->dir_x); + printf("dir_y> %f\n", pl->dir_y); return (0); } @@ -47,6 +50,8 @@ int sav_plane_x = pl->plane_x; pl->plane_x = pl->plane_x * cos(-rot_speed) - pl->plane_y * sin(-rot_speed); pl->plane_y = sav_plane_x * sin(-rot_speed) + pl->plane_y * cos(-rot_speed); + printf("dir_x> %f\n", pl->dir_x); + printf("dir_y> %f\n", pl->dir_y); return (0); } -- cgit v1.2.3