Search Unity

Question Need help to figure out how to approach my problem

Discussion in 'Animation' started by heromade, May 12, 2020.

  1. heromade

    heromade

    Joined:
    Aug 27, 2017
    Posts:
    33
    This is just a general question, so I guess it is an easy task for people with more Unity animation knowledge than me.

    I have the following situation: I create the player by script during runtime. The player basically consists of a body and limbs. The body is created by script with primitives, the limbs are created with a modeling software and later instantiated to the body.

    Now I want to add animations to the player. The limbs will get their animations from the modeling software, but the body is created in Unity and should only get a simple scale-animation in the up-direction.

    What is the way to combine these two animations now? Do I have to use layers or something?
     

    Attached Files:

  2. heromade

    heromade

    Joined:
    Aug 27, 2017
    Posts:
    33
    If anyone stumbles across this: I did not really manage to put all of the animations in the same Animator Controller, there was always something wrong.
    I now just created a Script as an Animator Handler, which has references to all Animators of the character (e.g. one from the body, a list of animator controllers with all legs) and it contains functions like SetBoolAllAnimators(string, bool) to set parameters on every animator.
     
  3. dukerustfield

    dukerustfield

    Joined:
    Dec 5, 2019
    Posts:
    33
    You can use avatar masks to disregard some animation.

    You can use timeline and only make animations for individual parts. Like I have a timeline entry that controls my head/face and another that controls the body. If you drag down only the head to the timeline, any animations that move around the arms and legs won't register as those objects aren't available to the clip