Answered

Split animations

Anonymous 10 months ago updated by Peter - Soxware Developer 10 months ago 1

I want to make an animation of reloading weapons, but I do not want all the bones of the weapon to be inside the player root, because the guns are placed dynamically in the hands. Is it possible to split the animation? or maybe there is another way?

UMotion Version:
1.20
Unity Version:
2018.4.6

Answer

Answer
Answered

Hi,
thank you very much for your support request.

Everything that is placed as a child of an Animator controller can be addressed by that controller. You can use animation clips that point to transforms that are not always available (but are added during runtime).


So while creating the animation (during edit time), place the weapon as a child of the hand. During runtime, use transform.SetParent() to make the gun a child of your hand.

Please let me know in case you have any follow-up questions.

Best regards,
Peter

Answer
Answered

Hi,
thank you very much for your support request.

Everything that is placed as a child of an Animator controller can be addressed by that controller. You can use animation clips that point to transforms that are not always available (but are added during runtime).


So while creating the animation (during edit time), place the weapon as a child of the hand. During runtime, use transform.SetParent() to make the gun a child of your hand.

Please let me know in case you have any follow-up questions.

Best regards,
Peter