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

Added plane stalling if going too slow.

parent 4601a497
No related branches found
No related tags found
No related merge requests found
......@@ -216,6 +216,10 @@ int main(int argc, char** args)
glm::sin(-rot.x ),
glm::cos(rot.y)*glm::cos(rot.x));
ImGui::Text("Plane speed: %f", Input::m_planeSpeed); // Print to GUI.
if (Input::m_planeSpeed < Input::m_planeMaxSpeed / 4);
{
pos.y += glm::clamp(1 - (Input::m_planeSpeed) / (Input::m_planeMaxSpeed / 4), -0.1f, 0.0f) * 0.1;
}
plane-> setPosition(pos);
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