Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 saldavonschwartz · Oct 14, 2013 at 02:09 AM · editortransformplane

how to make a plane's height be Y instead of Z

By default, Unity creates planes normal to the y-axis. So that if looking thru the default camera the x-axis can be thought of as the width of the plane and the z-axis is the plane depth.

If I rotate a plain -90deg about the x-axis, this will make no difference as far as scaling goes: x will still be width and z will be what I'd think of now as height of the plane. First I thought I was misunderstanding the frame of reference for the plane's transform and so I created an Empty merely as a parent transform; I added the plane with its transform set to identity as a child of the empty and then I rotated the empty about the x-axis by -90. But still the same result: I have to use the z-axis for the plane's height / width or however we might want to call the other dimension on the plane along with x.

In contrast, this is not the case with a cube object: rotating it about the x-axis by increments of 90deg does alternate between y and z.

So am I missing something or is it just not possible because, say, it was decided that a plane has absolute coordinates?

Comment
Add comment · Show 1
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 Fattie · Oct 14, 2013 at 08:40 AM 0
Share

"Create Plane" mentioned by Robert below, is a really fantastic script - you need it in every project.

"So am I missing something" -- no, it was just "silly" if you will that Unity's basic plane from the old days was "laying down". it's always caused confusion!

1 Reply

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

Answer by robertbu · Oct 14, 2013 at 02:28 AM

You can use the new Quad game object. A Quad is a 2 triangle plane oriented on the XY plane with normals facing backwards (i.e. towards the camera if the camera is in its default negative 'z' position looking towards positive 'z').

Another solution is the CreatePlane editor script you will find in the Wiki. It allow sfor both horizontal and vertical planes and allows you specify their world size and (indirectly) the number of triangles.

Comment
Add comment · Show 6 · 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 saldavonschwartz · Oct 14, 2013 at 02:30 AM 0
Share

Sweet, I'll check those out. However, does that mean that then I'm right in that planes are set to absolute coordinates by default, as opposed to "regular" 3d objects?

avatar image robertbu · Oct 14, 2013 at 02:37 AM 0
Share

No, planes are like other game object. I'm not sure of your experiment. If you look at the reference for Transform, you will see scaling is 'localScale'. Scaling is defined in local coordinates. So scaling the default plane will always be done using the X and Z. Scaling the Quad will always be done using the X and Y. If I scale a cube on the X, rotation does not change which local axis is scaled.

avatar image saldavonschwartz · Oct 14, 2013 at 03:24 AM 0
Share

I meant the final transformation relative to the camera's up direction. A cube with scale (1,2,1) looks "camera" to the default camera. If I add now a 90 rotation about x, the same cube now looks "deep" but no longer "tall" to the same camera. I'd have to now change z (relative to world transform) to make the same cube appear "taller." You are right that the same applies to a plane, but I still think it is a Unity convention that they chose x and z as the orthonormal pair to base the plane off. It could have been x,y ins$$anonymous$$d. Personally, I ended up going for the following setup: An Empty and the plane inside it with its transform rotated -90 about x (now relative to the parent empty's transform ins$$anonymous$$d of to world transform). So if I change the y scale of the parent empty, this maps to changing the local z in the plane. Still thanks for the hints!

avatar image Eric5h5 · Oct 14, 2013 at 03:42 AM 0
Share

You would typically use the plane as a "floor" of some kind, so x and z makes much more sense as a default than x and y would.

avatar image saldavonschwartz · Oct 14, 2013 at 03:46 AM 0
Share

Right right, I know. $$anonymous$$akes sense. But then I'm right that the choice of x,z is arbitrary in the sense that say, one of the definitions of plane is a fixed point in the basis and two orthonormal vectors. Could have been x,y too for that matter (as far as the definition, not taking into consideration the most likely use case of a plane in a 3d engine).

Show more comments

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

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Transforming Spherical Surface to a Planar Surface 3 Answers

unity not undoing transform changes? 1 Answer

Trail Positions Keep Changing 0 Answers

Inspector window transform component showing ONLY local cordinates 1 Answer

My rigged mesh does not react in Unity 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