From ce0b95cd47e3a8bfa62e27dacd055b3ff5448254 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Fri, 23 Oct 2015 14:44:07 +0200 Subject: [PATCH] Added a background to prevent white borders during screen shake --- src/game/Game/LevelSystem.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/game/Game/LevelSystem.cpp b/src/game/Game/LevelSystem.cpp index ff3bb8c..fade607 100755 --- a/src/game/Game/LevelSystem.cpp +++ b/src/game/Game/LevelSystem.cpp @@ -77,8 +77,20 @@ void dd::Systems::LevelSystem::Initialize() auto t_halfPipe2 = m_World->CloneEntity(t_halfPipe); auto transform2 = m_World->GetComponent(t_halfPipe); transform2->Position = glm::vec3(0.f, 34.6f, -15.f); //Halfpipe Value + + // Added to prevent white borders around screen shake + { + auto halfPipeBackground = m_World->CreateEntity(); + auto transform = m_World->AddComponent(halfPipeBackground); + transform->Position = glm::vec3(0.f, 0.f, -15.f); + transform->Scale = glm::vec3(6.f, 6.f, 10.f) * 2.f; + auto model = m_World->AddComponent(halfPipeBackground); + model->ModelFile = "Models/Halfpipe.obj"; + m_World->CommitEntity(halfPipeBackground); + } } + //Background /*{