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
1
Question by Miriam · Jul 06, 2010 at 07:04 PM · parentchildlocalscaledistort

Geometry distortion on child objects

Hi,

I have quite a few objects that get large geometry distortions.

alt text

I've been working under the assumption that the cause of this is a combination of non-uniform scaling on the parent and arbitrary rotation of the child (from the unity scripting manual under lossyScale), however nothing I do seems to fix the problem.

All the parent objects have a scale of 1,1,1, and, just to make sure I've put this script on the parents as well:

function Awake () {
    gameObject.transform.localScale = Vector3.one;
}

The children objects do all have odd rotations (they were originally set to regular numbers, but 90 seems to become 90.000001 or 89.999999 etc), but I even tried to counter this with the following script:

function Awake () {
    transform.eulerAngles.x = Mathf.Round(transform.eulerAngles.x);
    transform.eulerAngles.y = Mathf.Round(transform.eulerAngles.y);
    transform.eulerAngles.z = Mathf.Round(transform.eulerAngles.z); 
}

Our game is literally riddled with this problem, and it seems to be happening to more and more objects, and I've simply run out of ideas on how to fix it.

Thank you in advance for any advice!

Yours

Miriam

ps. un-parenting everything really isn't an option - the scene would become insanely messy and unmanageable.

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 TaigaStudios · Jul 06, 2010 at 07:51 PM 0
Share

I have seen the same thing, but hasn't bothered me, I think it's the way unity rolls, can someone confirm? Atleast .000001 isn't really visible to the player.

2 Replies

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

Answer by Eric5h5 · Jul 06, 2010 at 08:39 PM

It's not something you need to fix. That's the result of floating point imprecision when converting quaternions to euler angles, and the difference between 90 and 90.000001 is incredibly small and unnoticeable.

Comment
Add comment · Show 3 · 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 Miriam · Jul 07, 2010 at 08:05 AM 0
Share

Hi, thanks for your answer. The only reason I was fixing it was in the hope that it would fix the object skew. (according to the unity scripting manual (under lossyScale) the combination of a parent with non-uniform scaling & a child with arbitrary rotation is the cause of the strange object skew)

avatar image Novodantis 1 · Jul 07, 2010 at 09:55 AM 0
Share

Have you got a screenshot of the skewing? It sounds very peculiar...

avatar image Miriam · Jul 07, 2010 at 02:03 PM 0
Share

I've edited the post and added a picture. Thanks

avatar image
0

Answer by haydster7 · Oct 03, 2014 at 08:36 AM

Try adding an intermediary empty GameObject then making that a child of the object with non-uniform scale. Use the empty gameobject as the parent.

Comment
Add comment · 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

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

Make a simple tree 1 Answer

what happens when Unit in Hierarchy is destroyed? 1 Answer

How do you select a root object from a child's script? 1 Answer

Accessing a child's animation to play or stop it 2 Answers

Broadcasting message to multiple children 1 Answer


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