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 randosity · Jun 25, 2012 at 03:16 PM · physicsmassfixedjointridgidbody

ridgid bodies of different mass

I am working on a script that allows the user to assemble structures by putting together rigid bodies using fixed joints created in game, in order to create larger structures. I was having problems, and it seemed that some things made with this script would act completely erratically and the rigid bodies would basically spasm until they broke the fixed joint holding them in place.

Then I realized the root of my problem, if two rigid bodies are joined with a fixed joint, and they have significantly different masses (2:1 or more) they do not attach as expected, and usually the lighter one will begin to violently shake around the heavier object. The temporary solution is just to make all the objects the same weight, but if they don't have masses based on their size, the physics will be very unrealistic. Any suggestions?

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

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by bodec · Jun 25, 2012 at 03:53 PM

Try isKinematic. here is the link to the scripting refence to give you a better idea about it.

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 randosity · Jun 25, 2012 at 04:17 PM 0
Share

Thanks, but is$$anonymous$$inematic is not the answer. From what i understand is$$anonymous$$inematic basically turns the rigid body physics off, and allows for animation of rigid bodies and the attachment of a rigid body to what is essentially not a rigid body.

What I need is a way to attach two or more rigid bodies that have a large difference in mass, and have them interact accurately.

avatar image bodec · Jun 25, 2012 at 04:32 PM 0
Share

when joined does this happen if they are sitting side by side of if a heavier one is on top. does it still happen when the lighter one is on top. physics may be having a problem if the smaller one is not really suppose to be able to support the larger one and is tring to break throu.

avatar image
0

Answer by randosity · Jun 25, 2012 at 11:32 PM

well, it seems to happen regardless of their orientation.

In the real world, the ability of one object to support another has nothing to do with mass, but rather with compressive strength. So yes, it is supposed to work like that.,

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 RobertVerdes · Apr 30, 2018 at 01:34 PM

Old question, but surprisingly there isn't anything on Unity Answers about:

  • Joint.massScale and

  • Joint.connectedMassScale

which should be what you were after.


On a different note:

It would be helpful to start a conversation on the topic and build a proper answer. I'm still trying to understand how they should be used, the documentation skips on some details:

Assuming RB1 with mass 2 has a FixedJoint with connected body RB2 with mass 20:

  1. If massScale = 2, does is act on RB1's mass (2 x 2 = 4), or is the joint always seeing RB1s mass as 1, and would now see it as 1 x 2 = 2?

  2. Probably another way to ask #1 but, should we set the massScale and inverseMassScale to reflect the bodies' mass difference (1:10), or is it an extra scaling, on top of their current difference? If so:

  3. What would be the difference between (massScale = 1, inverseMassScale = 10) and (massScale = 2, inverseMassScale = 20), and why do we need both?

  4. What does "scaling mass and inertia is fundamentally nonphysical and momentum won't be conserved" actually mean and what does it imply?

  5. What exactly is "inverse mass" and "inertia tensor" in the first sentence "The scale to apply to the inverse mass and inertia tensor of the body prior to solving the constraints". It's the same for both massScale and connectedMassScale. Copypaste mistake? "inverse mass" is the mass of the connected body I presume.

@randosity did you find your way? Cheers.

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

I want my Player to have collision physics 1 Answer

Having a RaycastHit event create a component? 1 Answer

rigidbodies with flight physics and autopilot - Approach? 0 Answers

Box2D force on object? 0 Answers

FixedJoint Stopping Rigidbody Physics 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