Search Unity

Problem trying execute animations of 2 child of the same parent

Discussion in 'Animation' started by aguanteyo88, Aug 23, 2018.

  1. aguanteyo88

    aguanteyo88

    Joined:
    Jul 18, 2018
    Posts:
    1
    Hi, i'm newbie in Unity and i have a big problem when i trying to execute 2 animations in 2 diffetent objects but childs of the same parent.

    i'm working with invector third person controller. This asset package contains an animator controller to animate the character. On the other hand i have a car. The idea is animate the character to enter the car, and animate the car to open and close doors.

    The problem is more complex, but i simplify for explanation. When I want to enter the car, I execute the animation of the character (is in animator controller) that corresponds to the action of opening the door. Then I have a car, and one of the children is the door. In the door I have the Animation component, and in that moment I execute the animation so that the door turns.

    Suppose that when I execute the action of opening the door I want the door to open and that the trunk be opened with a different animation. Because the door and the trunk are childrens of car, Unity don't execute the 2 animations, else Unity execute only one animation.

    I read about the layers, but i have 2 objects that they have an Animation component, and i dont know if i can have two animator controllers. I trying to create other animator controller for the car, but in Animator i try to open the new animator controller and nothing happened. Only i can see the animator controller of character.

    Does anyone have any idea how to solve this situation?
     
  2. NetherChef

    NetherChef

    Joined:
    Apr 2, 2018
    Posts:
    15
    I think that might be the problem. I don't think a single animation can enter 2 animation states at the same time. How about giving the door and the trunk their own animators, and then parenting them to the car?