Search Unity

Question Animation for 2 objects

Discussion in 'Animation' started by dav1003, Feb 12, 2023.

  1. dav1003

    dav1003

    Joined:
    Mar 8, 2021
    Posts:
    1
    Hello,
    I was wondering how, is there a way to make an animation including two objects? For example the combat system in the older assassins creed games, where the player just presses a button and the character and target play animations, the character an attacking one and the target a blocking one. How would I make something similar?
    As in, what if I want the target to block an attack realistically, the attack landing on the area where the enemy is blocking? I don't really know how to describe it, and I can't find a solution online, all the melee combat systems just start an attack that has a collider and checks if the enemy is in that collider, without any target animations.

    Example of AC black flag combat system, where the character and the target cooperate on the final animation so it looks realistic:
     
  2. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    Yes, but it can be tricky. Fable 3 for instance struggled with it so badly that they fade to black every time there's an animation involving two characters in order to swap out the models for different ones. Dark Souls simply teleports the player to a designated location every time they open a chest.

    In Unity, it's as simple as animating both objects/characters together (using Blender or a similar tool) and then playing their animations at the same time in-game. However, you have to account for positioning and animation transition timing. When a character enters a specific trigger zone for a group interaction, they may be in the incorrect positioning, so you have to figure out how to get them to the correct position.

    Hundreds of people worked on AC4, good luck ever achieving anything close to what's shown in that video. I'm sure they had many issues they needed to work past, and the animation code is likely very extensive and complex.

    I'm not saying it's impossible to create animations similar to that, but you'll have to do a lot of work and figure things out as you go.
     
    dav1003 likes this.