diff --git a/level.cc b/level.cc index fef60ca..03d0e5c 100644 --- a/level.cc +++ b/level.cc @@ -57,6 +57,8 @@ void Level::render(ACGL::OpenGL::SharedShaderProgram shader, bool lightingPass, } void Level::update(float runTime, glm::vec2 mouseDelta, bool wPressed, bool aPressed, bool sPressed, bool dPressed,bool kPressed, bool lPressed) { + physics.takeUpdateStep(runTime); + // Ignore first two mouse updates, because they are incorrect // DON'T try to move this functionallity elsewhere static int i = 0; @@ -89,8 +91,6 @@ void Level::update(float runTime, glm::vec2 mouseDelta, bool wPressed, bool aPre if(lPressed) camera.setIsPhysicsCamera(false); - physics.takeUpdateStep(runTime); - cameraCenter->setPosition(physics.getPos(0)); cameraCenter->setRotation(physics.getRotation(0));