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 3D Animations "adding" its rotation keyframes instead of setting them

Discussion in 'Animation' started by G4llifreyan, Jul 10, 2021.

  1. G4llifreyan

    G4llifreyan

    Joined:
    Jun 22, 2020
    Posts:
    12
    Hello everyone,

    I recently started a FPS game to train my Unity3D skills and I'm currently doing the gun animation. I started with a firing animation and an idle "animation" (only one frame). The problem happened when I wanted to make an animation that doesn't go back to its initial position for equipping the gun.

    I first made it in Blender (the gun has to be low and raise to be in the normal position).


    I exported it as a .fbx file in my Unity project and took the keyframes I needed to make the Equipping animation.
    When I play it in the Animation window, it renders well in the scene view.


    But, when I play it with the Animator Controller, it doesn't play the animation like before, it adds the animation to what's already there. Here, it adds ~25° on the local z axis each time the equipping animation is played in the Animator Controller. Below is a video in which I reset few times the Animator Controller so the equipping animation is played multiple times.


    (For now, the animation is just two keyframes so I can find the way to solve the problem)

    I bet it's a checkbox I didn't check.
    Thanks to anyone who can help me. I can give anything more on the project if needed.