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
4
Question by William Cain · Dec 21, 2011 at 10:10 PM · rotatesize

Object skewing on rotation

I am having a problem rotating basic objects. This problem did not occur until Unity 3.0 came out. I built a tank using the basic shapes in Unity. I have the tank built using a few empties and then attaching cubes and cylinders on to it. With the object so layered when i rotate it, it skews the position and size of the child objects. Any idea why that is happening?

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
22
Best Answer

Answer by aldonaletto · Dec 22, 2011 at 03:23 PM

That's a well know problem: when you child objects to a non-uniformly scaled parent, rotating the children make them skewed (see lossyScale). You should have the parent uniformly scaled to avoid this problem. It's impossible with the simple cubes, unless you create some scaling script that scale the mesh vertices and return the object's localScale to some uniform value. But since this isn't a trivial script, it would be easier to create cubes or other solids in the correct scale in Blender, 3dsMax or other 3D editing tool, then import and use these solids in Unity.
EDITED: I've just tested something that worked: don't child the objects directly to a non-uniformly scaled parent - child this non-uniform object to an empty object, which will be the parent of the other objects too; since an empty object is scaled 1,1,1, childing other objects to it don't cause this problem. The tank structure could be something like this:

Tank (empty object)
  Body (non-uniformly scaled object)
  Turret (empty object)
    Turret body
    Cannon
You can rotate the Turret or the Tank objects without having skewed parts (at least it worked in a simple test I did).
Comment
Add comment · Show 2 · 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 GameDev_Chuck · Feb 12, 2016 at 07:07 PM 0
Share

You sir... Are the man!

avatar image nickkohrn · May 11, 2018 at 01:46 PM 0
Share

I have been stuck on this issue in my 2D world. It turned out that I had a child's parent scaled incorrectly, which caused the rotation of my child objects to skew when rotating. Thank you for your experienced answer.

avatar image
5

Answer by emcx · May 06, 2014 at 05:26 PM

To chip in my similar problem and solution - I imported my models from blender and the scale in animations was going bananas in unity, while being ok in blender. What I found was animating rotation of objects with non-uniform scale, made their children do wonky scale skewing in unity. A quick fix to this, you can select parent objects in blender, and ctrl+a to apply their scale and rotation. That way all their child objects will have a nice 1,1,1 scaled parent, and my skewing issues were gone.

Comment
Add comment · Show 2 · 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 iojoe · Feb 24, 2016 at 01:13 PM 0
Share

Had hit exactly the same issue. For Blender models this is a great tip/solution that avoids the need to restructure the hierarchy of your model. $$anonymous$$any thanks emcx!

avatar image UtopianKing · Mar 02, 2018 at 04:44 PM 0
Share

Thank you. I had an object on a hinge changing shape while swinging, when just a few $$anonymous$$utes ago it worked fine. The problem was that I assigned that object under a parent object so I can move it around more easily with the other objects.

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

11 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

Related Questions

Camera rotation around player while following. 6 Answers

(IMPORTANT!)How to make a high resolution screenshot including GUI? 1 Answer

Remove x86 bins from Android build 1 Answer

How can I minimize size of an app besides resizing textures? 0 Answers

Unity Networking Increasing Build Size a Lot 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