I’ve been playing with Unity for a while and still can’t find a way to properly layout my objects. I am using ortho camera, because I want to make simple Tetris game with it. Unfortunately not everything seems to go well. I can’t get objects to show where I want or “stick” them to grid. Anyone done anything similar?
Could you have a plane or some sort of flat surface and align the boxes(I assume u r using boxes) to it then point the camera at the plane? So they slide down the wall so to speak? then once everything is aligned, you could set the material of the plane to “none” and it would become transparent…or just delete once the boxes are organised?
The problem is that I’m using orthographic camera and when I place objects on screen where they should be, under different resolutions they just loose their proper position and i get see “margins” with camera background color.
Is there any way to fix this? I want my camera to always look at certain area, but with different resolutions this always changes.
I think I’m having a similar problem here. When I’m on Unity, I set the orthographic size of the camera to a value that captures all my background plane. However, when I build it, it goes shorter. I attached two screenshots, one from inside Unity and another from the web build.
However, the problem doesn’t have to do with resolutions. On the browser shot, you can see that the left side “cuts” the “spaceship” (yes, I have two left hands for modeling!), but on the shot inside unity, it is well inside of it.
If I change the orthographic size, it shows “more” on the web build, but in the view inside unity I start to see the blue background.
Looks like that’s just a matter of window shape. Unity’s editor view can be set to any shape, and it looks like you’re using a wide shape. But games can adapt to different screen shapes, and Unity does that by changing the sides.
You probably just need to change your web player output settings to a different shape. I like big wide web players myself, so I use 720x480. (But if the user goes fullscreen, then the shape of their screen is what matters. So it’s nice if a game can be playable at a range of shapes.)
Your game looks like it might work well at a size like 720x360. Ultra-widescreen.
EDIT: Unity locks the vertical size and adapts the horizontal, but I don’t see why custom code couldn’t change the camera FOV based on the detected resolution, so as to achieve the opposite–locked horizontal and adapting vertical–if desired.
This doesn’t seem like a “good thing” to me. I thought that I should see the area represented by the camera, and not change with the resolution. For example, if the user made some really wide resolution, the background plane would start to show it’s edges.
But you’re right, if I adjust the game view the camera box updates. Thanks.