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 ExTheSea · Dec 27, 2012 at 06:29 PM · animationpositionparentbonearmature

How to bind two gameobjects together?

Hey,

want to parent an Armature to a bone of another armature but if i change the hirachy of the Model they are in the animation doesn't play properly anymore.

Here is a bit more explanation:

alt text

The selected object is the "child" armature. The red dot is roughly were the "parent" bone is. In the bottom picture one of the animation is playing. You can see the armature object didn't move it's position only the the bones. This makes it a bit difficult for me to just make a script that can handle the "childs" position. The reason why i want to parent it is. The parent bones of the red marked one can rotate around there y-axis which makes the Model lean.

Here is the current Hirarchy a bit more zoomed in:

alt text

I would be happy to get a solution wether it's in Unity or in Blender.

PS: I read both of the answers but i still didn't manage to get a working script and the suggestion to apply the animation to an empty gameobject i just don't understand how that works? So íf anyone would explain me those suggestion a bit more that would me too.

here is the dropbox link containing my current setup. If you want to help me just delete the PlayerScript after you imported it to Unity.

https://www.dropbox.com/sh/n2v0nqrv6ocy85u/rD-huVjURK/Unity%20Parent%20Issue.unitypackage

unityakbuildhirarchy.jpg (21.7 kB)
unity parent explanation.jpg (260.4 kB)
Comment
Add comment · Show 3
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 Golan2781 · Dec 30, 2012 at 02:33 PM 0
Share

I don't quite get your question. On the one hand, you don't want the two parented together, on the other hand you want them 'as if' parented together?

avatar image ExTheSea · Dec 30, 2012 at 03:29 PM 0
Share

I basically want them to be parented but the problem is that when i just drag the one armature to the bone of the other armature in Unity the child doesn't get affected by any animation ... because the hirarchy changed. If i would be able to parent/link the armature to the bone in Blender beforehand everything would be fine but until this point i couldn't figure out how. Now i thought i may be able to achieve a similar behaviour with a unity component or script without changing the hirarchy (like a joint but without rigidbodies).

So my question is: Is there a way to do it in Blender or in Unity? (Preferrable in Blender)

Do you have an idea?

avatar image ExTheSea · Dec 30, 2012 at 06:34 PM 0
Share

Does no one have an idea how to parent an armature to a bone of another armature in Blender?

2 Replies

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

Answer by Hamzah Khan · Dec 31, 2012 at 09:57 AM

Perhaps use empty gameobjects as mediums of transformation? Sorry that's the best I can do but I still don't understand exactly what you want

Comment
Add comment · Show 11 · 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 ExTheSea · Dec 31, 2012 at 11:30 AM 0
Share

Well the perfect solution would be if someone can tell me how to link/parent an armature-object to the bone of another armature in Blender but if that's not possible for some reason i need a way of parenting the armature to the bone in Unity without actually dragging it on the bone. I can't do that because if i just drag it the animation can't root to the armature anymore because it isn't in the "right place". I really need to know this because i can't really continue otherwise.

If you have more question just let me know.

Hope to hear from you.

avatar image whydoidoit · Dec 31, 2012 at 11:32 AM 0
Share

Can you not apply the animation to the empty game object that Hamzah is suggesting - therefore having the right structure for the animation system to find the rig?

avatar image ExTheSea · Dec 31, 2012 at 11:40 AM 0
Share

What do mean by applying the animation to the gameobject? Both armatures are part of a model and as a result the animations are stored in the $$anonymous$$odel Object.

avatar image ExTheSea · Jan 01, 2013 at 07:24 PM 0
Share

I added the Player's hirarchy how i have it right now to the question.

avatar image ExTheSea · Jan 03, 2013 at 11:34 PM 0
Share

Hamzah or whydoidoit can you please explain what you meant with your suggestions. I added more information to the question.

Show more comments
avatar image
0

Answer by benk0913 · Dec 29, 2012 at 03:52 PM

Maybe you should try setting ones transform.position to the others transform.position. Having the first transform position constantly set the others transform position as his.

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 ExTheSea · Dec 29, 2012 at 04:06 PM 0
Share

Thanks for the reply. That's a good idea. The only problem i have still is that I have animations which affect both armatures. One of them I play right at the beginning. I just tried your apporach and just set the position of the "child" gameobject to the position of the "parent" gameobject but that makes it so that the "child" doesn't get affected by the animation anymore and the position is way of where it should be. Is there a way around this? $$anonymous$$aybe with relative positions/rotations?

avatar image ExTheSea · Dec 31, 2012 at 04:24 PM 0
Share

benk sry for not replying to your comment but for some reason i can't see it here on Unity answers. I just noticed that you replied because i checked my mail inbox. The problem that i have with the script method is that the Armature root object is to get the positioning and the rotation right. The Animation was still affecting the Armature but the script did set the position of it to something else. I would need a script which works with relative positions and relative rotations but i couldn't figure out how to make such a script until this point although i'm pretty good with maths and scripting :) . I would also prefer a method which doesn't involve permanently executing the same code if possible as i think it could cause problems (performance-wise) in a multiplayer-game.

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

12 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

Related Questions

Bone doesn't rotate through script 1 Answer

Armature moves further then the root bone 1 Answer

Animations imported from blender look strange... 1 Answer

Animate Blender model with primitive colliders 0 Answers

Attaching First Person Controller to Kinematic 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