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 Duolasa · Aug 25, 2013 at 06:08 PM · c#childrotate object

Child not following parent's rotation

I'm, trying to make an object rotate by using

rigidbody.AddTorque(Vector3.forward totalForce 10000);

And the object starts to rotate, however the childs that represent the body don't follow the reotation, like so: https://www.youtube.com/watch?v=3yfZLPxSpe4

I'm applying the torque on an empty object that is the parent (the axis on the video)

Does anyone know why this is happening and how I can try to fix it?

Comment
Add comment · Show 4
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 getyour411 · Aug 25, 2013 at 06:51 PM 0
Share

Can you do something like this (on the child): gameObject.transform.rotation = transform.parent.rotation?

avatar image Duolasa · Aug 25, 2013 at 08:23 PM 0
Share

That would just rotate the child I believe.

avatar image getyour411 · Aug 25, 2013 at 08:25 PM 0
Share

I thought the issue was that the child object didn't rotate with the parent? Apply whatever you want to the parent (as in your AddTorque example) and the child with the above line will set its rotation = to the parent.rotation

avatar image Duolasa · Aug 25, 2013 at 09:33 PM 0
Share

$$anonymous$$aybe I didn't expose my problem correctly. I didn't want the child to rotate, I wanted the child to be affected (to have a translation movement) by the parent's rotation. Basically I wanted to have a smooth movement on the Blue and Red pieces of the video.

I was already able to fix it though. Thx for the help and time

1 Reply

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

Answer by Duolasa · Aug 25, 2013 at 09:12 PM

I managed to fix my problem by setting the children as Kinematic. Don't know how this fix it but it did...

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

16 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

Related Questions

Multiple Cars not working 1 Answer

Distribute terrain in zones 3 Answers

C# Find component InChildren 3 Answers

Instantiated GameObject gets spawned as a child 2 Answers

Get Children of Child and Deactivate/Activate on Demand 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