Ciliary muscles are responsible for changing the focal length of the eye lens according to the distance of the object.