diff --git a/Escape-the-Dawn/Shaders/Fragment.glsl b/Escape-the-Dawn/Shaders/Fragment.glsl index a16878d..ca7ef0b 100644 --- a/Escape-the-Dawn/Shaders/Fragment.glsl +++ b/Escape-the-Dawn/Shaders/Fragment.glsl @@ -23,7 +23,7 @@ in VertexData { vec3 ShadowCoord; } Input; -vec3 scene_ambient = vec3(0.3); +vec3 scene_ambient = vec3(0.98f, 0.95f, 0.8f); out vec4 fragmentColor; @@ -54,7 +54,7 @@ void main() { float bias = 0.0005; vec4 shadowMapValue = texture(shadowMap, Input.ShadowCoord.xy); if (shadowMapValue.z < clamp(Input.ShadowCoord.z - bias, 0, 1)) { - visibility = 0.5; + visibility = 0.3; } } diff --git a/Escape-the-Dawn/Systems/PlayerSystem.cpp b/Escape-the-Dawn/Systems/PlayerSystem.cpp index 53b327d..02878b0 100644 --- a/Escape-the-Dawn/Systems/PlayerSystem.cpp +++ b/Escape-the-Dawn/Systems/PlayerSystem.cpp @@ -27,15 +27,18 @@ void Systems::PlayerSystem::UpdateEntity(double dt, EntityID entity, EntityID pa return; auto collision = m_World->GetComponent(entity, "Collision"); - if(collision == nullptr) - return; - - if(collision->CollidingEntities.size() > 0) - { - m_World->RemoveEntity(entity); - } auto name = m_World->GetProperty(entity, "Name"); + if(collision != nullptr) + { + for(auto ent : collision->CollidingEntities) + { + if(m_World->GetProperty(ent, "Name") == "Obstacle") + { + m_World->RemoveEntity(entity); + } + } + } if (name == "Camera") {