0
\$\begingroup\$

let me explain what i have. a camera that render only a sprite ( sprite renderer) and what i'm looking for is to scale that sprite renderer to fit a screen portion (not the entire screen) for example 0.145 (normalized) anyone can help me?

fix : i mean, from 0 to 0.145 so the entire area ( it will be a 125x125 image ) so i need to keep the aspect ( same width and height) and i'm using orthographic camera

\$\endgroup\$
2
  • \$\begingroup\$ 0.145 of the width, or the height, or the area? Are you using a perspective camera or orthographic? Why have you tagged this question Unity-UI if you're not using the Unity UI system (eg. UnityEngine.UI.Image) but the SpriteRenderer that's not part of the UI system? \$\endgroup\$ – DMGregory Oct 20 '20 at 13:16
  • \$\begingroup\$ i'm sorry my miss, i have benn fixed it, thank's you for your help \$\endgroup\$ – mirkojpn Oct 20 '20 at 13:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.