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

Question How to apply same animation in two different but same father object and one object has unique layer?

Discussion in 'Animation' started by hehedang, Jan 27, 2023.

  1. hehedang

    hehedang

    Joined:
    Jun 16, 2017
    Posts:
    8
    like this video:


    There is two object:eek:ne is the gun(with bone) and one is the hand(with bone too).Two object are in the same fbx file
    First after i finished animating,they exported in the same fbx file sharing the same animation from 3dsmax or blender or something.It works fine as excepted.Hand bones moving as except,gun bones same.
    After that i deactived the hand skinned mesh,and export skinned hand(and the bone attached on it)as individual to unity.
    I watched this post:
    https://forum.unity.com/threads/animate-object-when-its-animator-is-in-different-gameobject.462995/
    and i found i'm encountering pretty same situation with him.But the problem is:I already animated 5 weapons and it is impossible to do it from start.Six years later maybe there is a solution i guessed?

    Also,even if i restart to animating it.I still don't know how to give different controller a same layer in animator during the runtime.For example:lots of weapon have it's own unique animation and it's own Animator Controller,But they all have the"left hand throwing grenade"animation(just like the video shows).How do i do this?Animating them each one by one,or there is a way to add layer to animator controller during the runtime?

    Thank you
     
  2. hehedang

    hehedang

    Joined:
    Jun 16, 2017
    Posts:
    8
    Guys,I figured it by myself.
    What i need to do is to separate two arms,one is called"left arm"the other is called"right arm".
    When I throwing grenade,I'll just deactive the left arm,and spawn a new left arm to throw.After the animation is complete,I'll re-active the left arm.And the problem is solved!How good is that.