Home > front end >  Why is my Unity plane seemingly 10 times too big
Why is my Unity plane seemingly 10 times too big

Time:12-24

I'm a relative Unity noob. I have a fairly simple scene. Currently in the following you will see a plane (object WorldTilemapGfx) and 2 sprites (Tile C: 0 R: 0, and Tile C: 1 R: 0).

In the following picture you see I've selected one of the sprites. Its scale is 1 x 1, and its at position 1, 0. enter image description here

Now I select the other sprite. enter image description here

So far the positions and sizes seem ok.

Now if I select the game object with a "plane" mesh it shows in the inspector as scale 2, 1. This is the scale I expect since it is supposed to be as wide as two of the tiles above, and as high as only 1 of them.

However its visually 10 times too big.

enter image description here

If I increase the X scale of one of my tiles by 10, then the relative sizes between tile and plane look ok

enter image description here

Also the image used for my tile is 256 x 256. enter image description here

enter image description here Can someone suggest what I am missing? Thanks.

CodePudding user response:

See Unity Mesh Primitives

Plane

This is a flat square with edges ten units long oriented in the XZ plane of the local coordinate space. It is textured so that the whole image appears exactly once within the square. A plane is useful for most kinds of flat surface, such as floors and walls. A surface is also needed sometimes for showing images or movies in GUI and special effects. Although a plane can be used for things like this, the simpler quad primitive is often a more natural fit to the task.

whereas

Quad

The quad primitive resembles the plane but its edges are only one unit long and the surface is oriented in the XY plane of the local coordinate space. Also, a quad is divided into just two triangles whereas the plane contains two hundred. A quad is useful in cases where a scene object must be used simply as a display screen for an image or movie. Simple GUI and information displays can be implemented with quads, as can particles, sprites and “impostor” images that substitute for solid objects viewed at a distance.

CodePudding user response:

Ok.. confirmed using a Quad gave me what I expected in scale.. I now understand that the underlying plane mesh is actually 10 x 10 in size.

https://forum.unity.com/threads/really-dumb-question-scale-of-plane-compared-to-cube.33835/#:~:text=aNTeNNa trEE said:-,The plane is a 10x10 unit mesh.,a quick floor or wall.

  • Related