Forum

Change camera viewport from height to width

In our project we have made the canvas responsive and 16by9, but now we are considering to change to container fit, specially for portrait mobile.I mean, for instance, instead of being 16:9 the canvas will look something crazy like 5:10.But trying to do this makes the camera fit for height, and as it is wider than the allowed with, the 3D object gets cut.We are thinking in making the camera fit the width, but also needing the extra taller canvas, so when the object rotates it doesn't get cut at the bottom or top.Attached a couple of screenshots of what I'm trying to say.Ideally the object looks "tiny" as in "cut.jpg" but can render at bottom as in "extrawidth.jpg".Is there any easy way to make this happen??

Thank you for your response.That's exactly what I thought, that the camera fits height.What I'm trying to figure out is some way to render the shoe fitting the screen's width, but when rotating it pointing downwards it gets cut (like when zooming in), even though I still have extra screen height.

I can imagine some way to tell the camera viewport to be some rectangle taller than wider, taking profit of the screen size in portrait mode.Of course this would require some kind of calculus to match the camera viewport to the current canvas dimensions . For instance, an iPhone 6 in portrait mode could have, in theory, a canvas 375px width, ~600px height, but for our current 16by9 canvas it adjusts to 375px width, 0.5625*375 ~= 210px height.But if I make the canvas full width and full height, the shoe renders outside the screen's width, instead of fitting inside, which is not desirable.And if I maintain the 16by9 resolution, it renders properly from side to side, but it gets cut when pointing downwards.

Probably there is no easy solution to this, but worth asking you guys that have more experience in these matters.