unity3d - Understanding the camera, getting it to fit 480x800 -


it might weird locking on 480x800 resolution, i'm having problems understanding camera in unity.

i'm trying build 2d application unity 4.3.4, supports 2d. i've done i've created background 480x800, whats confusing cant seem fit camera.

if edit size, w , h of camera, can fit 480x800 values size=4, w=0.33, h=1. think bad approach of problem.

so how it? want support mobile screen size in portrait mode, , width being atleast 480. new samsung galaxy has 1080 pixels in screenwidth. ration between screen height , width seems 0.5 0.6, setting w 0.7 , h 1 should enable flexibility?

and when developing multiple resolutions, do background? 480x800 created not fit bill on 1920x1080 device!?

no matter how approach this, you'll either: a) need seperate background each aspect ratio b) have parts of background not visible when using aspect ratios.

there isn't optimal solution far can see sort of problem. way approach create background wide enough accommodate widest possible screen (16:9 logically). background wide screens ignored on other aspect ratios. has benefit of being quite easy implement, depending on use of background may not work case.

you alternatively resize camera, forcing aspect ratio want (similarly how went it) calling camera.aspect = 4f/3f; 4/3 aspect ratio want. of course far pretty, , distort final game, depending on device you're using.

finally, easiest solution far set unity background color black, , let fill in excess black strips.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -