Hello!

Probably a simple yet tricky questions here:

(this mathematical solution goes beyond my understanding)

I have a Spotlight and want to control the value of its **spotAngle**.

And here it comes:

Example:

When my *range* is 30 (for instance) my *spotAngle* needs to be 1.

But otherwise when my *range* is 1, my *spotAngle* needs to be 30.

When * range* is 15, *spotAngle* needs to be 2.

When * spotAngle* is 15, * range* needs to be 2 etc.

This is to keep the same spotAngle size on an object that will vary in range.

Here’s a piece of my script (*a_distance* comes from a raycast somewhere else):

```
public void AddLength(float a_distance)
{
spotlight.range = a_distance;
spotlight.spotAngle = ?????? ;
}
```