Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Jordan Miller · May 04, 2010 at 09:33 PM · movementpositionparentchild

Children Objects move weird

I have a GameObject (u1) that becomes the parent of another GameObject (u2) but after u2 is placed as a child under u1 something strange happens: when I tell u1 to go to a location u2 doesn't go with it, how do I make go along with it? it seems to be attached because it's rotation will change, but the actual child gameObject wont travel with the parent. is there a way to make them like, attached or something?

P.S. I have a character and when you move that character all the things attached to it move with it, like clothing, and flashlights. but when I make the flashlight a child of my unit in game it doesn't move with it. whats up with that?

Comment
Add comment · Show 1
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 Tetrad · May 04, 2010 at 09:50 PM 0
Share

Are you sure you don't have some kind of bug in your code or forgotten script that sets the position of the child game object every frame? The fact that rotation is changing but not position seems to point to that idea.

1 Reply

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

Answer by dhendrix · May 04, 2010 at 09:54 PM

Do both objects have rigidBodies? If so you could try setting the child's rigidBody to isKinematic = true.

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 qJake · May 04, 2010 at 10:17 PM 0
Share

Adding on to this, if both objects have rigidbodies and, for example, use gravity, the child position won't obey the parenting relationship, since the rigidbody overrides it.

avatar image Jordan Miller · May 04, 2010 at 10:26 PM 0
Share

yes, I think it was that, and I had a character controller on it when I took them both off its fine now, ah, so yes, thanks guys, I've been struggling with that for hours!

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

No one has followed this question yet.

Related Questions

Make a simple tree 1 Answer

Moving parent to position of child 0 Answers

camera and positiong problems 1 Answer

How to smoothen movement of a child object? 1 Answer

Child ignoring Parent's movment 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