public void Walk(int dir, float maxDist, List <AABoundingBox> objects) { vec3 translation_vector = (dir * speed) * camera.GetLookDirection(); translation_vector.y = 0; if (!Collided(objects, translation_vector)) { if (camera.Walk(dir * speed, maxDist)) { mPosition += translation_vector; model.TranslationMatrix = glm.translate(model.TranslationMatrix, translation_vector); collider.Translate(translation_vector); } } }