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

How can I play two animations for two different gameobjects at the same time with one trigger.

Discussion in 'Animation' started by Sephyrus, Jan 17, 2016.

  1. Sephyrus

    Sephyrus

    Joined:
    Dec 26, 2015
    Posts:
    2
    I have a Bow mesh with a bending and string pulling animation and a character that makes the motion of firing a Bow and I'm trying for the past 3 days to try and sync them together with a single trigger on LMB click.

    I've tried attaching the characters animation controller to the bow gameobject, added the bow animation in another layer in the animator and set it to play using the same trigger for the character bow firing animation but it didn't work out as it was playing only one of those depending on which gameobject was selected in the scene.

    I've noticed when I added the same animation controller to the bow, depending on which game object was selected in the scene, the bow animation or the character animation clips said they were missing they're components in their keyframes or something along those lines. My only solution was to make a different script a different animation controller and use the same trigger but that produced clunky results (close to what I want) but I have a feeling it's not meant to be done this way.

    Some help would be much appreciated as I'm running out of ideas. Thank you!

    TLDR: How to sync two different animation clips from two different gameobjects to play on same trigger. (e.g) A Bow anim + Character anim.