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 QC_Scott · Aug 04, 2014 at 09:01 PM · physicsrigidbodytransformforceparenting

Parenting not working with massive force to rigidbody. Does having rigidbody on child screw things up?

Ok, so I have 3 objects a, b and c. a is a character, b is a hinge for a weapon and c is a weapon. c is a child of b and b is a child of a. When c hits the environment a massive force is applied to a's rigid body, sending it flying. b and c are not following a as they should instead they are just sitting at the bottom of the environment. I don't know why this is, can someone please help? Also, a, b and c have a rigidbody each. Does having a rigidbody on a child mess up how the parenting system works?

Comment
Add comment · Show 2
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 Owen-Reynolds · Aug 04, 2014 at 10:01 PM 0
Share

What do you mean "B is a hinge"? Hinges aren't gameObjects. They're something you add to a rigidbody gameObject, to connect to another. The hinge would be on gun C going to player B (unless you want a double-jointed hinge?)

Technically, one object "hinged" to a larger one shouldn't be a child. But I've gotten great results with child hinged rigidbodies, the same way you describe. I find childing works better when one object is much larger than the other.

There's probably something else wrong with the setup. Does everything work fine when you drop it, roll it around, give a smaller push?

avatar image QC_Scott · Aug 05, 2014 at 09:11 AM 0
Share

By a hinge I mean since b is a sphere which is use as a center to a so c will rotate around properly. I achieved this through adding a force to b's rigidbody. I call it a hinge because it serves a similar purpose to a hinge joint. It just seems to work better in this case. Sorry for the confusion.

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Owen-Reynolds · Aug 05, 2014 at 02:13 PM

Yes, having a child object with a rigidbody (and no joints -- just a rigidbody) is well-known to be no good for anything.

A regular object just sits there. If you make it a child of something, it moves/spins with the parent. If you give it a rigidbody, it moves/spins on it's own. If you give it both, it doesn't technically mess anything up -- it follows both rules -- but the result is an ugly mess. It moves completely on it's own, adding any parent movement as non-physics.

The main thing, maybe, is the child object won't get any of the parent's velocity, since that isn't the rule. When the parent goes up, it will pull the child up, but then the child's rigidbody says "I'm in the air? How? Time to start falling."

Comment
Add comment · Show 4 · 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 meat5000 ♦ · Aug 05, 2014 at 02:16 PM 0
Share

$$anonymous$$ake it $$anonymous$$inematic.

I add rigidbodies to Swords for collision detection. They must be $$anonymous$$inematic or strange things happen. The sword is a child of the Character's hand.

avatar image QC_Scott · Aug 05, 2014 at 05:39 PM 0
Share

Thanks for giving me the rules with parenting and rigidbody.

avatar image Owen-Reynolds · Aug 06, 2014 at 01:38 PM 0
Share

meat: theOP isn't using a joint/hinge component. $$anonymous$$erely using the word "hinge" descriptively. Even so, I'm thinking the default setting on hinges is to never break. They seem to just deform under pressure.

I guess I'm not sure what the OP is trying to accomplish. Looks-wise, a kinematic rigidbody child is the exact same thing as not being a rigidbody at all -- just frozen to the parent. I assumed the OP added the rigidbody to the weapon to get some "play" in it, or have it jostle a bit. But not really sure.

avatar image meat5000 ♦ · Aug 06, 2014 at 02:05 PM 0
Share

Completely missed that. Thanks for pointing it out. Ill omit the irrelevant line :)

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Shooting a cannonball. 6 Answers

Direction of rotation and ApplyForce 1 Answer

Rotation Force on a model 2 Answers

Attaching multiple rigidbodies together and spawnning as prefabs 1 Answer

Force is not applied to the rigidbody? 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