View3D size and camera

Software: Away3D 4.x

Freon, Newbie
Posted: 09 August 2012 12:54 PM   Total Posts: 13

I have an app that will be used on several devices with different screen resolutions. I would like the app and game to fill the entire screen.

That means (I think) that I have to create a View3D with the same dimensions as the resolution of the device. But that also means I have to change the cameras position (and/or FOV) or else the game will fill to little or too much of the screen.

I could hardcode something for every single resolution out there but that’s not optimal.
I can’t find any mathemical solution either.

 

   

Richard Olsson, Administrator
Posted: 10 August 2012 10:54 AM   Total Posts: 1192   [ # 1 ]

If you scale up the view, the content of the view will scale as well to match the size of the view. So if you for example have a cube that covers the entire view, the cube will always cover the view even if you scale it up (as long as you keep roughly the same aspect ratio.)

   

Freon, Newbie
Posted: 10 August 2012 11:35 AM   Total Posts: 13   [ # 2 ]

Oh yeah - that will work of course, thanks.
But I guess there is no perfect way to support different aspect ratios then?

Thank you…

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X