Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

attached object does not follow parents animation

Discussion in 'Animation' started by -OTTO-, Mar 13, 2015.

  1. -OTTO-

    -OTTO-

    Joined:
    Mar 1, 2015
    Posts:
    2
    I am trying to have my character hold a sword, but it is not following the animation of the hand. I have placed the sword as a child of the bone in my armature, but nothing happens when i play the game - the sword just floats alongside my character. My character is rigged as a humanoid, and this is working nicely (for now).

    After waching several tutorials, this seems to be the way you would do it (and it is mearly glanced over) what am i doing wrong?

    1.png 2.png
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    -OTTO- likes this.
  3. -OTTO-

    -OTTO-

    Joined:
    Mar 1, 2015
    Posts:
    2
    Thank you! So it was in the ORG bones
     
  4. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Ah I see now, you do have all your IK transform attached to your rig and you did parent your sword to the wrong transform.

    You should clean all the unnecessary transform, either in your authoring tools or in the model importer under mask uncheck all the transform that you don't need. This is an important step to be sure that all these unnecessary transform doesn't bring down your game performance.
     
  5. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    this project is utterly broken in unity 5. All the scripts dont compile, and all the script components have their script cleared. As a result, even after fixing the scripts, i can't figure out how they're meant to go together to make the project function.
     
  6. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Hum this is very strange, I did a test and imported back this package into Unity 5.0p1 and it was working.

    Anyway the project was only showing that you can simply parent your sword transform to your character hand transform to make it move with the animation.

    In OTTO case, we was parenting his sword to the wrong transform, the hand IK transform which was not animated in Unity.