Hey guys,
I have a sprite, and an orthographic camera.
The sprite is 1024 pixels wide. It’s Pixels to Units is set 1.
What I want to do is set up the orthographic camera so that it’s width is the equivalent of the sprite’s size. That means the camera should not see anything beyond the right or left edges of the sprite.
The thing is, I can’t figure out how to calculate what the orthographicSize of the camera should be so that it’s width is only wide enough to display the sprite. I don’t care about height, as this is one of two cameras being used, and is asking as a “mask” so to speak.
I’m looking more for a formula than a number (if that wasn’t obvious) because I may very well decide to change the width of the sprite.
So, any suggestions?
Thanks!