Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by tasbar · Feb 25, 2010 at 09:10 AM · positionscaleunit

What units do the transform options position and scale have?

I have got a game object of type 'plane' with a scale of X=24, Y=1, Z=10. It is a prefab and within a script I want to instantiate it several times but always as a direct neighbour (in Z direction) of the previous one. Actually I thought that I could simply take the position of the first instance, add 10/2 (Taking the scale of Z=10 as the width of the object and considering the pivot point in the middle of the plane) to position.z of the next instance and instantiate it beside the first one.

But when I start the script it seems (by my sense of proportion) that the different instances are all only positioned like 5% in Z direction to their predecessor.

So I am wondering what unit is used for scale? It seems that a value of 10 for scale doesn't mean a width or length or height of 10 units. But then, how can I get the width or length of a plane (or other object).

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by jonas-echterhoff · Feb 25, 2010 at 09:45 AM

Scale is a multiplier of size. So, a scale of (1,1,1) means the object is shown in the original size of the mesh data. A scale of (2,2,2) makes it twice as large in all directions. If you have an object which has a width of exactly 1, then your logic would work. However, the built-in plane mesh is larger, I think it has a width of 5 or 10, IIRC. So you have to multiply that to your scale values to get the actual size of the object.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tasbar · Feb 25, 2010 at 12:50 PM 0
Share

I see. But then ... where can I set (or get) the size of an object? How and where can I modify the size (i.e. width and length) ins$$anonymous$$d of scaling it?

avatar image
3

Answer by Jeremy 1 · May 24, 2010 at 05:29 PM

The problem is that the 'Plane' gameobject is not a "unit plane" the same way as the 'Cube' object is a "unit cube" in Unity. For some reason Unity internally scales up the size of all planes 10 times.

Try this: from an empty scene create a Cube and a Plane, and set both of their positions to (0, 0, 0). Notice that both gameobjects have a scale of (1, 1, 1) but the plane is much bigger than the cube. Now set the Cube's scale to (10, 10, 10) and notice the two objects are now the same size.

I have no idea why Unity treats planes different from other primitives. It's kind of annoying. So if you want to tile planes, you need to multiply your position transforms by 10 times as well.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image yoyo · May 31, 2011 at 09:20 PM 0
Share

The standard Plane is a 10x10 grid of quads, each quad is 1x1 units. Agreed that a unit plane would be more useful.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

1 Person is following this question.

avatar image

Related Questions

How is transform.position affected by scaling? 1 Answer

get screen width and height in world size 3 Answers

Worldspace UI in wrong position/scale after scene change 0 Answers

Scaling and Rescaling of Objects. 1 Answer

Unity3D Screensize remain same Position and Scale 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges