Search Unity

Properly calculating bounds on projector?

Discussion in 'Scripting' started by pretender, Jul 16, 2020.

  1. pretender

    pretender

    Joined:
    Mar 6, 2010
    Posts:
    839
    Hello, I have searched the forum but couldn't find how to calculate this. Here is the problem. I have an image that I am projecting to ground at 90 angle. I want to be able to zoom camera on that object so I current setup I need to have bounds calculated. How to properly calculate bounds regarding image width, height that i have, and orthographic size and aspect ratio? I have noticed that If I divide size by 10 it matches the collider on the image, so I have used that to get bounds but not luck.

    Thanks!
     
unityunity