Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Discussion What is the best workflow you've found for authoring frame data for attack animations?

Discussion in 'Animation' started by Program-Gamer, Sep 11, 2023.

  1. Program-Gamer

    Program-Gamer

    Joined:
    Nov 16, 2018
    Posts:
    15
    Attack animations usually have a bunch of metadata for defining at which points the animation can be interrupted, how many windup/recovery frames there are, when to enable/disable hurtboxes, and potentially a lot more things like that. I thought about making a custom StateMachineBehavior for handling this stuff on a per-state basis, but I figured I should ask if more experienced people have found better/alternative ways to do all this.
     
  2. Kybernetik

    Kybernetik

    Joined:
    Jan 3, 2013
    Posts:
    2,536
    My Animancer plugin lets you define custom classes to use as Transitions so for my Platformer Game Kit I made a transition with an array of hit data and a custom editor to let you visualise and edit the hit shape alongside the animation.

    Something similar could probably be achieved with StateMachineBehaviours, though it might be tricky to set up a way to preview the hit shapes alongside the animation.