Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Make animation add to its current rotation?

Discussion in 'Animation' started by TheKrazyDev, Feb 10, 2023.

  1. TheKrazyDev

    TheKrazyDev

    Joined:
    Sep 8, 2021
    Posts:
    107
    Ok so I have a gun with reload animations, and I have blank state for when the gun isnt reloading. Though this locks the rotation. Like im adding recoil from a script but the guns rotation is like locked when the animator is activated.
     
  2. Unrighteouss

    Unrighteouss

    Joined:
    Apr 24, 2018
    Posts:
    599
    I would make the gun a child of an empty object -> animate the gun as normal -> rotate the empty object for the recoil.

    This might be a pain to do if you've already made a bunch of animations though.

    I've used this in the past to automate renaming animation hierarchies when I change a hierarchy: https://github.com/s-m-k/Unity-Animation-Hierarchy-Editor

    Don't know if it still works, it's not maintained anymore.

    Paid asset that does the same thing: https://assetstore.unity.com/packages/tools/animation/animation-hierarchy-editor-89866

    Haven't used it, but looks pretty good.
     
    TheKrazyDev likes this.