Skip to content
Snippets Groups Projects
Commit e59b602a authored by JonShard's avatar JonShard
Browse files

Imroved stalling.

parent 55d46b08
No related branches found
No related tags found
No related merge requests found
...@@ -216,10 +216,8 @@ int main(int argc, char** args) ...@@ -216,10 +216,8 @@ int main(int argc, char** args)
glm::sin(-rot.x ), glm::sin(-rot.x ),
glm::cos(rot.y)*glm::cos(rot.x)); glm::cos(rot.y)*glm::cos(rot.x));
ImGui::Text("Plane speed: %f", Input::m_planeSpeed); // Print to GUI. ImGui::Text("Plane speed: %f", Input::m_planeSpeed); // Print to GUI.
if (Input::m_planeSpeed < Input::m_planeMaxSpeed / 4);
{ pos.y -= (1 - Input::m_planeSpeed / Input::m_planeMaxSpeed / 4.0f) * dt; // Stalling.
pos.y += glm::clamp(1 - (Input::m_planeSpeed) / (Input::m_planeMaxSpeed / 4), -0.1f, 0.0f) * 0.1;
}
plane-> setPosition(pos); plane-> setPosition(pos);
plane-> setRotation(glm::degrees(rot)); plane-> setRotation(glm::degrees(rot));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment