diff --git a/Shooter.h b/Shooter.h index 4ff703c..25ec937 100644 --- a/Shooter.h +++ b/Shooter.h @@ -19,7 +19,7 @@ class Shooter final : public Engine { private: std::shared_ptr player = std::make_shared(ObjectNameTag("Player"), ShooterConsts::CUBE_OBJ, - Vec3D{1.5, 1.9, 1.5}); + Vec3D{1.5, 1.2, 1.5}); std::shared_ptr playerController = std::make_shared(player, keyboard, mouse); Window mainMenu; diff --git a/engine/physics/HitBox.cpp b/engine/physics/HitBox.cpp index cc9cc47..924f91c 100644 --- a/engine/physics/HitBox.cpp +++ b/engine/physics/HitBox.cpp @@ -38,7 +38,7 @@ void HitBox::generateSimple(const Mesh &mesh) { for(const auto& t : mesh.triangles()) { for(int i = 0; i < 3; i++) { - auto point = Vec3D(t[i]); + auto point = mesh.model()*Vec3D(t[i]); if(point.x() > maxX) { maxX = point.x(); } @@ -78,7 +78,7 @@ void HitBox::generateDetailed(const Mesh &mesh) { for (const auto& t : mesh.triangles()) for (int i = 0; i < 3; i++) - points.insert(Vec3D(t[i])); + points.insert(mesh.model()*Vec3D(t[i])); _hitBox.reserve(points.size()); for (const auto& it : points)