]> git.localhorst.tv Git - blank.git/blobdiff - src/world/World.hpp
check for entities under crosshair
[blank.git] / src / world / World.hpp
index 2fd312c7ce39efb990ed2be07b16f0ce6b7313a8..6d27d12b8ab97f03fc6ef05688ae771a4348ccdd 100644 (file)
@@ -38,6 +38,7 @@ public:
 
        World(const Assets &, const Config &, const WorldSave &);
 
+       // check if this ray hits a block
        bool Intersection(
                const Ray &,
                const glm::mat4 &M,
@@ -46,6 +47,14 @@ public:
                float &dist,
                glm::vec3 &normal);
 
+       // check if this ray hits an entity
+       bool Intersection(
+               const Ray &,
+               const glm::mat4 &M,
+               Entity *&entity,
+               float &dist,
+               glm::vec3 &normal);
+
        bool Intersection(const Entity &e, std::vector<WorldCollision> &);
        void Resolve(Entity &e, std::vector<WorldCollision> &);