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 Archonn · Oct 09, 2012 at 05:54 PM · rotatescalechilddistorted

Rotating and scaling children

How can i have 2 cubes which look like this: http://s11.postimage.org/4itcvqpw3/Example.jpg

But where one is a child of the other. When i try, it looks like this: http://s12.postimage.org/h0a4dgq31/Fail.jpg

Comment
Add comment · Show 4
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 hvilela · Oct 09, 2012 at 05:57 PM 0
Share

What is your question?

avatar image Archonn · Oct 09, 2012 at 06:04 PM 0
Share

I want 2 cubes to be arranged like the first picture, but where one is a parent and the other a child.

When i try, the child is squashed in the same direction as the parent. So because the parent is upright, it is squashed vertically, and therefore the child is squashed vertically. I'd rather it was shrunk along its own vertical axis because it is rotated.

avatar image maxjt · Oct 09, 2012 at 06:27 PM 0
Share

Archonn: Have you know difference between local and world coordinate systems?

avatar image Archonn · Oct 09, 2012 at 06:58 PM 0
Share

I understand that in terms of X Y and Z coordinates. A child will be placed relative to its parent. In terms of scale, I thought that a parent might have a X scale of .5. A child might have a local scale x scale of 1, which would sort of mean 100% of its parents x scale so it would be the same size.

But i dont know how to apply that to this.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Owen-Reynolds · Oct 09, 2012 at 11:41 PM

There's a known "bug" with official Unity cubes as scaled/rotated children. If you import your own cube model, it should be fine. Or just get some free crates from the Unity store and change the textures.


The "bug", last I looked, is that rotated cubes have the rotation baked into the model, to run faster. When it has to go through a complex chain of parent rotating/scaling, that trick throws the order out of whack. [To check this, print the raw verts of a rotated cube -- unlike any other model, they are changed.]

Comment
Add comment · Show 8 · 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 Archonn · Oct 10, 2012 at 05:20 PM 0
Share

"If you import your own cube model, it should be fine. Or just get some free crates from the Unity store and change the textures."

Please explain. I made 2 cubes and applied a crate material to them, but it still didn't rotate/scale how i wanted.

avatar image Owen-Reynolds · Oct 10, 2012 at 10:42 PM 0
Share

I'm saying don't use cubes made by the Unity menu: `GameObject->CreateOther->Shapes->Cube.`

Can either borrow a cube-shaped crate model(and not use the material.) Or make a cube in Blender.

That might sound like a pain, but the built-in Unity shapes are placeholders. You're supposed to eventually replace them with real models.

avatar image Archonn · Oct 11, 2012 at 03:57 PM 0
Share

I imported this http://u3d.as/content/yuji-nagata/wood-crate/3nv

But when i parented, rotated and scaled it it was still squashed the wrong way. I'd like you to be more specific as to how to do it.

avatar image Owen-Reynolds · Oct 11, 2012 at 11:56 PM 0
Share

I'm guessing that particular crate uses the default Unity cube (does the $$anonymous$$esh filter just say Cube, and there's no extra crate model in your Assets?) So just bad luck.

The idea is to get a non-Unity cube. Any crate with an "interesting" texture will have its own model (notice how the one you picked just has the same pattern on each side.) Or model your own cube. Anything that isn't a standard Unity shape model should work.

avatar image Archonn · Oct 14, 2012 at 10:19 AM 1
Share

At first i was making a cube in blender, scaling it to 1 1 .1 to make it flat and saving it as .blend. When i imported it to unity, I was getting a cube which was scaled to 1 1 .1.

I just discovered that if i scale a cube to 1 1 .1 in blender and save it as a .obj, then when i import it in unity i get a flat platform which is scaled 1 1 1. When i parent and rotate it, because no scaling is being done, its not squashed.

Not really an answer to the question i asked, but good enough.

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

12 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

Related Questions

How to Prevent Child Deformation on Rotate? 1 Answer

Object scale/rotation changes when parented to flipped object 0 Answers

How to change child's rotation whithout affecting it's scale? 1 Answer

A way to rotate object 90 degrees when it becomes child of parent? 1 Answer

change/scale child rectTransform with Parent (with video) 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