I'm making a side-scrolling downhill biking game and since the player needs to have good visibility of the track ahead of him. At low speeds the player doesn't need to see as much of the level as when he's going at high/top speed. So I want to have the camera zoom out as the speed increases and zoom in again when the speed decreases. I know how to zoom in and out using layout scale but I can't wrap my head around the solution to make the player speed decide the zoom level in a smooth way.
If anyone has a solution, I'd love to hear it. Thanks in advance.