#Questions about resolution / camera / unities...

1 messages · Page 1 of 1 (latest)

wild adder
#

I don't even know how to ask...
My native language is Spanish and maybe I'm not explaining myself very well.

I'm just starting with Unity, although I have a lot of programming experience and I've tried several engines in the past.

I have a big doubt that is bothering me and I can't move forward.

I want to create something like this: https://3dsauce.com/demos/webgl/breakoutlevelselect/demo.html

As you can see, the objects are 3D and the camera I guess is "perspective".

I have managed to do this with the camera in perspective:

#

I have the following questions:
Resolution

  • Is it possible to set a fixed resolution?
  • How do I make it "responsive" and make it look good on every device?
    I can think of making the sizes to be a % depending on the resolution (the height and width of the screen).
    Regarding this, for example, I move the orange bar according to the position of the mouse and so that it doesn't go out of the screen, I have made a Clamp and as maximum it can be in X -0.8 or X 0.8... But I had to do it by eye?
  • Is there no way to do it mathematically?

I've also tried with orthographic and this is the result, but I don't like it... You can only see two parts of the blocks because I put an angle on it. If I rotated it to one side, maybe you would see 3 idk... But in the example the camera is in the centre and you can see 3 sides depending on the position of the cubes.

#

I've watched a lot of videos and when I seem to understand things, then I'm going to put it into practice and something goes wrong?

Let's see if someone can give me a hand. Thanks.

#

I think my biggest problem is that I think like a web developer. We have exact measurements, media queries to adapt the blocks to different resolutions, etc...

However, it seems that in Unity, at least working with Perspective Camera, it's not possible to calculate the size of objects in a pixelPerfect way (at least I haven't figured out how).

placid tangle
#

Ask smaller direct questions. You wrote a book and most people will not take the time to reply.

Yes it is possible to set a fixed resolution. You can find it in project settings with different aspects you support.

Mobile is weird because you have different phones with different designs like the iphone bubble at the top so you will have to test across multiple devices but always try that simulation setting.

Responsive is a loaded question with many different meanings to it and different answers I could give you. You will have to be more direct.

One thing to know here is some questions are not "hey how do I do this one thing" they are more "hey make my game for me" so be mindful of asking them types of questions.

Yes you can calculate the edges of the screen mathematically and there is youtube videos out there to do just that.

Unity is modular, anything you want to do in Unity you can do with enough time and skill. If you're jumping around game engines then that is bad as all engines are just tools and if you jump around you will never invest enough time with them to get good at any of them.

Unity is the be all to end all and while it might not be perfect, it gets the job done.

If you're new to unity check out Udemy and find the Gamedev.tv 3D course on Unity.

wild adder
# placid tangle Ask smaller direct questions. You wrote a book and most people will not take the...

Thank you for taking the time to answer my questions.
I may have explained myself badly. On one hand, I don't quite know how to explain what I need. On the other hand, I am not an English expert.

I understand what you are saying and being a programmer, I have also seen hundreds of cases where someone wants someone to program for them without having a single line of code. Although it may have looked like that, it's not my case: I just didn't find the answer and maybe I didn't know how to search well or ask the specific question.

I'll give you an example with my "game":

As I want to make it in 3D, the objects (for example, the walls) should be more or less big and closer or farther from 0,0 depending on how far they are from the camera.
This makes the measurements of the board not exact. For example, I've made a script so the paddle have limits movement between x>-0.8 and x<0.8.
However, I have calculated this by trial and error.

So my concrete question would be:
In my case, looking at the image, how can I position the walls so that the measurements are exact?

Thank you.