Fixed some lighting bug + serialization progress

This commit is contained in:
Antoine Pilote
2021-05-24 19:23:34 -04:00
parent e14a2f18d9
commit 1f1047d23b
33 changed files with 277 additions and 597 deletions

View File

@@ -21,10 +21,12 @@ void EditorCamera::Update(Timestep ts)
else
Input::HideMouse();
// Should probably not have speed binding in here.
if (Input::IsKeyPress(GLFW_KEY_UP))
Speed += 0.1f;
else if (Input::IsKeyPress(GLFW_KEY_DOWN))
Speed -= 0.1f;
if (Speed < 0)
Speed = 0;
@@ -38,7 +40,6 @@ void EditorCamera::Update(Timestep ts)
Translation.x += Speed * ts;
if (Input::IsKeyPressed(GLFW_KEY_LEFT))
Translation.x -= Speed * ts;
if (Input::IsKeyPressed(GLFW_KEY_UP))
Translation.y += Speed * ts;
if (Input::IsKeyPressed(GLFW_KEY_DOWN))
@@ -61,15 +62,9 @@ void EditorCamera::Update(Timestep ts)
if (Input::IsKeyPressed(GLFW_KEY_SPACE))
movement += up * (Speed * ts);
Translation += glm::vec3(movement.x, 0, 0);
Translation += glm::vec3(0, movement.y, 0);
Translation += glm::vec3(0, 0, movement.z);
Translation += Vector3(movement);
}
if (firstMouse)
{
mouseLastX = x;