Search Unity

Dynamic Combat Sequnce with Timeline

Discussion in 'Timeline' started by mythraend, Nov 18, 2018.

  1. mythraend

    mythraend

    Joined:
    Sep 1, 2012
    Posts:
    2
    Can Timeline be used to execute a fixed set of animations and sounds between two combatants regardless of their position in world space?

    For instance, character swings and hits the skeleton and then the skeleton swings and misses the character.
    • Code sets up a standardized set of relative positions between the character and monster then runs the timeline in the northwest corner of a room.
    • Then the character runs to the southwest corner of the room in random positions and you run the same position setup and the same timeline, hit, miss sequence
     
  2. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    Curious about this also
     
  3. seant_unity

    seant_unity

    Unity Technologies

    Joined:
    Aug 25, 2015
    Posts:
    1,516
    Yes, in 2018.3 Animation Tracks have the option to use Scene Offsets. That means the characters can start from their current position in the scene.

    Alternately, you can parent your characters to place them in the world. Timeline will only animate the local position and rotation, so they will play relative the parent gameObject.
     
    Flurgle likes this.