How to make your CapsuleCollider Height in your special attack keeps the size of view

I have a child special attack on my ship and I wanna make the CapsuleCollider range the same as the screen width no matter in what position my ship is located. Also The CapsuleCollider can’t go off throught the right screen limit because I have enemy spawner ships over there.

How can I do this using

void Update()
{
CapsuleCollider Sphere = gameObject.GetComponent();
Sphere.height = // What can I put here to make it constrain to the width of the screen size so I can move it with my // -----------------> // ship ?

}

Could anyone experienced with unity give me a light here? :o

There’s some code in this thread to calculate the width and height of the view frustum at a given distance.

Thanks andeeee !!