Made the resize function also center the scene.