Get screen/camera width depending on orthograpic size

I have a car in my game and as it drives faster, the orthographic size of a camera gets bigger, and so the distance on the screen between camera center and a car gets proportionaly smaller. Let’s say I want my car at x = 1/4 screen width from the right screen bound. How do I achieve that? I tried to Debug.Log orthographic size, it’s height and width (height*aspect), screen/width, screen.height. Unfortunately none of these parameters change as I modify orthographic camera size. Any suggestions?

I’m not sure if I understand fully what you want, but here is my take on this problem.

First I would determine what is the maximum and mininum orthographic camera size I would like, and then I would update the orthographic camera size with the normalized speed of the car. The animation curve is only to give more flexibility to decide when would the major or minor change in the orthographic size would kick in.

Something along those lines.

public AnimationCurve distanceCurve;
public float minOrthoSize;
public float maxOrthoSize;
public float maxCarSpeed;

public float CurrentCarSpeed {get; set;}

void Update()
{
    float normalizedCarSpeed = CurrentCarSpeed / maxCarSpeed;
    float newOrthoSize = distanceCurve.Evaluate(normalizedCarSpeed) * (maxOrthoSize - minOrthoSize);
    newOrthSize += minOrthoSize;

    Camera.Main.orthographicSize = newOrthoSize;
}