hello,
i have a question, why use this part of code:
float distance = transform.position.z - Camera.main.transform.position.z;
i have replaced distance in this part of code(with: 0,10,-10,-100,100):
Vector3 leftmost = Camera.main.ViewportToWorldPoint(new Vector3(0,0,distance));
Vector3 rightmost = Camera.main.ViewportToWorldPoint(new Vector3(1,0,distance));
but i don’t see a difference.