diff --git a/Editor/src/EditorLayer.cpp b/Editor/src/EditorLayer.cpp index 3ea37819..7d5fba31 100644 --- a/Editor/src/EditorLayer.cpp +++ b/Editor/src/EditorLayer.cpp @@ -61,10 +61,10 @@ void EditorLayer::OnUpdate() if (m_EditorInterface->ShouldDrawCollision()) { m_GizmoDrawer->DrawGizmos(currentScene, false); - glDepthFunc(GL_GREATER); + //glDepthFunc(GL_GREATER); - m_GizmoDrawer->DrawGizmos(currentScene, true); - glDepthFunc(GL_LESS); + //m_GizmoDrawer->DrawGizmos(currentScene, true); + //glDepthFunc(GL_LESS); } diff --git a/Editor/src/Misc/GizmoDrawer.cpp b/Editor/src/Misc/GizmoDrawer.cpp index b0ee3d13..e8cd240a 100644 --- a/Editor/src/Misc/GizmoDrawer.cpp +++ b/Editor/src/Misc/GizmoDrawer.cpp @@ -201,7 +201,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) RenderCommand::Enable(RendererEnum::DEPTH_TEST); - glLineWidth(2.0f); + glLineWidth(3.0f); auto boxColliderView = scene->m_Registry.view(); for (auto e : boxColliderView) { @@ -300,7 +300,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) const Matrix4& rotationMatrix = glm::mat4_cast(globalRotation); m_LineShader->Bind(); - m_LineShader->SetUniform1f("u_Opacity", 0.5f); + m_LineShader->SetUniform1f("u_Opacity", 1.f); m_LineShader->SetUniformMat4f("u_View", glm::translate(scene->m_EditorCamera->GetTransform(), Vector3(transform.GetGlobalTransform()[3])) * rotationMatrix); m_LineShader->SetUniformMat4f("u_Projection", scene->m_EditorCamera->GetPerspective()); @@ -325,7 +325,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) const Matrix4& rotationMatrix = glm::mat4_cast(globalRotation); m_LineShader->Bind(); - m_LineShader->SetUniform1f("u_Opacity", 0.5f); + m_LineShader->SetUniform1f("u_Opacity", 1.0f); m_LineShader->SetUniformMat4f("u_View", glm::translate(scene->m_EditorCamera->GetTransform(), Vector3(transform.GetGlobalTransform()[3])) * rotationMatrix); m_LineShader->SetUniformMat4f("u_Projection", scene->m_EditorCamera->GetPerspective()); @@ -358,7 +358,7 @@ void GizmoDrawer::DrawGizmos(Ref scene, bool occluded) gizmoPosition = glm::translate(gizmoPosition, { 0, cylinderLength / 2.0, 0 }); m_LineShader->Bind(); - m_LineShader->SetUniform1f("u_Opacity", 0.5f); + m_LineShader->SetUniform1f("u_Opacity", 1.0f); m_LineShader->SetUniformMat4f("u_View", gizmoPosition); m_LineShader->SetUniformMat4f("u_Projection", scene->m_EditorCamera->GetPerspective()); diff --git a/Nuake/src/Scene/EditorCamera.cpp b/Nuake/src/Scene/EditorCamera.cpp index e27cea4e..b6c34d9e 100644 --- a/Nuake/src/Scene/EditorCamera.cpp +++ b/Nuake/src/Scene/EditorCamera.cpp @@ -49,8 +49,8 @@ namespace Nuake } } - Yaw = glm::mix(Yaw, TargetYaw, ts * 20.f); - Pitch = glm::mix(Pitch, TargetPitch, ts * 20.f); + Yaw = glm::mix(Yaw, TargetYaw, 1.0f); + Pitch = glm::mix(Pitch, TargetPitch, 1.0f); if (!controlled) {