From d84d59a444ee1bcaf277dd39cfd9ca4d572deadc Mon Sep 17 00:00:00 2001 From: john Date: Sun, 18 Oct 2026 11:54:01 -0400 Subject: [PATCH] twerwerwer --- Engine.cpp | 2 +- Physics.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Engine.cpp b/Engine.cpp index 65a7b6f..d904206 100644 --- a/Engine.cpp +++ b/Engine.cpp @@ -101,7 +101,7 @@ Engine::Engine() rendersystem = new RenderSystem(); rendersystem->Initialize(); physicsengine = new Physics(); - physicsengine->gravity *= 1.25f; // slightly stronger gravity to suit the larger map + physicsengine->SetGravity(physicsengine->GetGravity() * 1.25f); // slightly stronger gravity to suit the larger map mainf = new Folder(); camera = new Camera(); camera->t.TranslateTo({ 0.0f, 5.0f, 0.0f }); diff --git a/Physics.h b/Physics.h index f1e8995..26590c6 100644 --- a/Physics.h +++ b/Physics.h @@ -106,6 +106,9 @@ private: public: Physics() {} + const glm::vec3& GetGravity() const noexcept { return gravity; } + void SetGravity(const glm::vec3& g) noexcept { gravity = g; } + int GetObjectAmount() const noexcept { return (int)objects.size(); } void AddObject(p* obj) { objects.push_back(obj); } const std::vector& GetObjects() const { return objects; }