- Home /
How to keep any object at the specifield seen size when change the screen resolutions.
Just like the Pixel perfect camera system but I use perspective camera. I just want it fixed at the specifield size although I change the scree resolution.
now i use
screen hight / field of view = 25.1
to keep the ratio between screen hight and FOV at the fixed value but it is not perfect .
Sorry for my newbie English skill .
Answer by AdityaViaxor · Aug 08, 2018 at 07:04 AM
If you have used sprites for player then this problem wouldn't occurred but if you have used canvas for player then this problem may occur so in order to solve this problem you set you canvas to "Constant pixel size in editor "
ok Sorry $$anonymous$$y bad, Sprite Renderer changes size with device you have to manage it using program$$anonymous$$g. Write a script in which get the resolution of screen and use this code
{ size = (Screen.width * referenceSize) / 1920f; }
you can change referenceSize and"1920" as per your requirement and also need to set position and use cases for different resolutions.
.
Your answer
Follow this Question
Related Questions
How should I size a plane to put images on? 1 Answer
Making a 2d Track Sprite. 0 Answers
My sprite is abnormally smaller in the scene 2 Answers
Changing an image size cancels its anchoring? 1 Answer
Scale script don´t work 0 Answers