From c65787ebfc5f0701bb4366ef22cddc8af2d243ee Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 25 Jul 2025 01:57:49 -0600 Subject: More tree things --- src/player.c | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'src/player.c') diff --git a/src/player.c b/src/player.c index bb63903..136a006 100644 --- a/src/player.c +++ b/src/player.c @@ -83,18 +83,22 @@ void updatePlayer(Player* player, Game* game) camera->position = player->position; camera->target = Vector3Add(player->position, player->direction); - /* Ray ray = (Ray){ */ - /* .position = player->position, */ - /* .direction = player->direction */ - /* }; */ +#ifdef FT_DEBUG_MODE + Ray ray = (Ray){ + .position = player->position, + .direction = player->direction + }; + + DrawRay(ray, YELLOW); - /* int tests; */ - /* WorldUID uid = castRayAtWorld(&game->world, ray, &tests); */ + int tests; + WorldUID uid = castRayAtWorld(&game->world, ray, &tests); - /* printf("%d\n", tests); */ + printf("%d\n", tests); - /* if (uid != -1) */ - /* { */ - /* DrawBoundingBox(game->world.entities[uid].box, RED); */ - /* } */ + if (uid != -1) + { + DrawBoundingBox(game->world.entities[uid].box, RED); + } +#endif } -- cgit v1.2.3