diff options
| author | Mel <einebeere@gmail.com> | 2023-08-14 03:40:10 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2023-08-14 03:40:10 +0200 |
| commit | 7562a79fa214245544cb379423314c3a0766a7f2 (patch) | |
| tree | 0aaafd06c6026fabc82dbc3454487d009c9043e7 /src/Entities/Player.hpp | |
| parent | 5a1b126f1f6d55226c2b5068d0c17c428fd29ba8 (diff) | |
| download | meowcraft-7562a79fa214245544cb379423314c3a0766a7f2.tar.zst meowcraft-7562a79fa214245544cb379423314c3a0766a7f2.zip | |
Generate AABBs for terrain that collides with Player
Diffstat (limited to 'src/Entities/Player.hpp')
| -rw-r--r-- | src/Entities/Player.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Entities/Player.hpp b/src/Entities/Player.hpp index 86d8c90..0422509 100644 --- a/src/Entities/Player.hpp +++ b/src/Entities/Player.hpp @@ -1,5 +1,6 @@ #pragma once +#include "../Common/FlexArray.hpp" #include "../Time.hpp" #include "../Transform.hpp" #include "../GFX/Camera.hpp" @@ -27,7 +28,8 @@ public: private: void update_camera_position(GFX::Camera& camera); - static Bool collides_with_terrain(Position::World new_position, World::World& world); + static constexpr UInt MaxCollidingTerrain = 34; + static FlexArray<AABB, MaxCollidingTerrain> colliding_terrain(Position::World new_position, World::World& world); // Creates a bounding box where `position` is at the center of the bottom face. static AABB bounding_box_for_position(Position::World position); |
