• 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 Raresh · Nov 14, 2016 at 07:20 PM · rotationrigidbodychildren

Children rotating constantly are moving parent with Rigidbody?!

http://answers.unity3d.com/questions/1264898/children-with-lookat-in-update-moves-root-object.html

Related to an older question I posted that I haven't found any answer to...

It seems that having children that are constantly changing their rotation, even if it's a very small change, will move the root object if it has a Rigidbody that is not kinematic or is not affected by gravity.

Making the rigidbody kinematic stops this, stopping the rotation of the children stops this, removing the rigidbody stops this. Any ideas? Thanks!

Comment
Add comment · Show 6
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 Raresh · Nov 14, 2016 at 07:42 PM 0
Share

Two factors that affect the speed of the Rigidbody movement:

1) Child rotation speed

2) Child distance from the origin

3) The number of children rotating constantly

In a test I made, I had a child spinning 3-4 times / second, and i got it to move a lot just by placing it like 100 units away.

avatar image Naphier · Nov 14, 2016 at 08:37 PM 0
Share

I can't reproduce this and it seems like really odd behaviour. Please post more details: A screenshot of your hierarchy for these objects, their inspectors, and scripts controlling the rotation.

Show more comments

1 Reply

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

Answer by Naphier · Nov 14, 2016 at 09:35 PM

It appears that children with non-trigger colliders get aggregated into the parent's rigidbody. So rotating these children is adding some force to the parent.

So you have a few options:

  1. Add kinematic rigidbodies to the children

  2. Change the child colliders to triggers

  3. Remove the child colliders

Probably a few other options, but having the children with colliders is what is messing it up. Thanks for teaching me something!

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 Raresh · Nov 15, 2016 at 08:26 AM 0
Share
  1. Can't add any form of rigidbodies to the children, as that will defeat their purpose

  2. Can't have triggers, the children need to have physical collisions

  3. This won't be too realistic....

I would have expected the behavior you said, but only if I used physics to rotate them :/... but it does make sense even so.

However the only solution that I know of currently that could probably fix this are Joints. I tried that, the problem was if I instantiated something and attached it to the same points, they would glitch out, because the parent collider and the thing I was attaching were conflicting with each others...maybe I needed a different layer. I will look more into joints.

avatar image Naphier Raresh · Nov 15, 2016 at 07:47 PM 0
Share

The different layer idea might actually work for your current setup. Give it a shot. I know it's really only for collision detection, but maybe it also prevents child colliders from being aggregated into the parent rigidbody. The other solution is to not make these children of the rigidbody, but exist in their own hierarchy and have that new parent just match the transform of your current parent. That's likely the way I would do it, but I'm not fully apprised of your constraints.

avatar image Raresh Naphier · Nov 15, 2016 at 08:43 PM 0
Share

Constantly moving objects to a position wouldn't be 100% ideal. I will try the layer one with the Joints maybe, so that things don't collide with each others

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

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

Related Questions

Have an object bounce off colliders instead of drift 2 Answers

Parent GameObject dosen't move anymore if the children have a rigidbody 2 Answers

How to make a RigidBody not go into ground when tilted foward? 2 Answers

Instantiate GameObject to specific position on the Parent 2 Answers

Rotation Complications + rotation with parents and 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