Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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 johnfrian · Jan 30, 2012 at 10:00 PM · childdoorhingejointlocalscaleprimitives

Cube changes size when adding HingeJoint

I'm scripting a house for fun and to learn Unity better. My current obstacle seems to be the scale of the door, to which I'm adding a HingeJoint.

The door is a gameobject in a hierarchy of other objects, like so (slightly simplified):

House:

  • floor1
    • wallpiece
    • door
    • wallpiece
    • wallpiece
  • floor2
    • wallpiece
    • window
    • wallpiece
    • wallpiece
  • floor3-- etc

Everything is set using localscales and localpositions, and as a result displays perfectly positioned and scaled where I want it.

The problem: Adding a HingeJoint to the door makes the cube (the door) noticeably bigger. It no longer fits in its doorhole.

Looking at the localscale values of the door, they are the exact same before and after adding the hingejoint. The object itself however is visibly bigger.

Thanks for any insight into what is causing this, and thanks for a great tool like Unity 3d!

Comment
Add comment · Show 3
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 Paulius-Liekis · Jan 31, 2012 at 01:11 PM 0
Share

You're supposed to post your answer as once of the answers and then mark is as correct, ins$$anonymous$$d of adding "[solved]" to the topic. Welcome to Unity Answers!

avatar image Bunny83 · Jan 31, 2012 at 01:52 PM 0
Share

cut out from question
"Solution: Human error, the door had the wrong size all along. Adding a hingeJoing just revealed the problem."

avatar image Bunny83 · Jan 31, 2012 at 01:56 PM 0
Share

@johnfrian: You have two ways to deal with your question:

  • If you found the solution to your own question, post an answer and accept it.

  • If you think the question isn't relevant to anyone else (that would have been a reason to not post it here in the first place), just delete it.

Further more, if you plan to ask more questions in the future, please read the FAQs first, so you know what questions can be asked here and how they should be phrased.

2 Replies

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

Answer by johnfrian · Feb 14, 2012 at 11:12 PM

This was human error, the door had the wrong size all along. Adding a hingeJoint just revealed the problem.

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
avatar image
0

Answer by Bunny83 · Jan 31, 2012 at 02:01 PM

The point of an object hierarchy is that all childs inherit the parent position / rotation and scale. If you scale up the parent, all childs will be scaled as well.

Every GameObject represents another localspace in which other gameobjects can "live".

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

6 People are following this question.

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

Related Questions

Hinge Joint Breaks When LocalScale is Changed 3 Answers

Hinge Joints ignore limits 0 Answers

How do I access a child of my player through another script? 0 Answers

How do an animation for child objects 1 Answer

Make a simple tree 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