diff options
author | nathan <nathansmith@disroot.org> | 2025-07-25 07:57:49 +0000 |
---|---|---|
committer | nathan <nathansmith@disroot.org> | 2025-07-25 07:57:49 +0000 |
commit | c65787ebfc5f0701bb4366ef22cddc8af2d243ee (patch) | |
tree | 4de559bb7a77994c6e39adffb95edeeeb3d3a07a /src/player.c | |
parent | f96ad3c93b9a5a74d2af2e9b8b4835a672a9875b (diff) | |
download | FindThings-c65787ebfc5f0701bb4366ef22cddc8af2d243ee.tar.gz FindThings-c65787ebfc5f0701bb4366ef22cddc8af2d243ee.tar.bz2 FindThings-c65787ebfc5f0701bb4366ef22cddc8af2d243ee.zip |
More tree things
Diffstat (limited to 'src/player.c')
-rw-r--r-- | src/player.c | 26 |
1 files changed, 15 insertions, 11 deletions
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 } |