Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

What are the best sizing practices for creating a floor surface in my scene?

Discussion in 'Getting Started' started by SoCentral2, Oct 16, 2015.

  1. SoCentral2

    SoCentral2

    Joined:
    Oct 6, 2015
    Posts:
    10
    I'm planning my first 3d game. It will be based on a board game. The playing surface is in a 16:9 aspect ratio. What criteria should I use to decide the Unity unit size of the surface, what are the best practices and what are the considertions?

    For example, I've placed a Plane in my scene. To get the 16:9 ratio it's scaled X=8.889 and Z=5 giving an 88.89 x 50 unit surface area.

    Would this we good or bad? Why?
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    Because of the huge differences in needs and implementation, I don't think there's any established "best" way to do what you're asking. Some people may want the board to fill the screen. Others may want an area for a UI, so the board would only take up 3/4 of the width, for example. And others may use scaling/sliding UI objects so their game works on various screen sizes/ratios.

    Without knowing exactly what you're doing, it's tough to say for sure. But I'd probably avoid scaling your board in such a way, as it could have weird results with any child object placement, or reading click coordinates and such.

    If your game is tile based, I've found a simple way to handle things is to create the tiles as separate objects. This makes clicks on those tiles VERY easy to process. As far as scaling it to fit the screen, again, your exact needs would determine this, but you might be best off positioning near the center and leaving some blank space around the edges. Fill that area with a color that matches the board, if you like, but allowing a bit of flexibility in layout will make adjusting for other ratios a possibility. Otherwise you'll lock yourself into one layout and may have more problems to sort out later.
     
  3. SoCentral2

    SoCentral2

    Joined:
    Oct 6, 2015
    Posts:
    10
    Thanks for your detailed reply, I can see the information being useful further down the line. The problem I have is at a more basic level than your advice addresses.

    When I examine the Survival Shooter tutorial for inspiration on where to start with board size, I look at it and see it's been scaled in a roughly 50 x 50 grid. Looking at the WallCollider objects confirms this size. I wonder why this order of magnitude was chosen - why not 5 x 5 or 500 x 500? Was it determined by the size of the assets? Convenience of working? Do the unit sizes relate to anything real-world? How do the unit sizes relate to assets I create in something like Blender?
     
  4. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,510
    Ah, gotcha.

    1 unit of distance in Unity translates to 1 meter in real world space. This mostly affects the built-in physics, so you can set scale to mean anything you want if you're not using that.
     
    wenhan9604 likes this.