Search Unity

Animation plays, but only sort of.

Discussion in 'Animation' started by BlockManBlue, Oct 26, 2021.

  1. BlockManBlue

    BlockManBlue

    Joined:
    Feb 10, 2021
    Posts:
    3
    So I'm trying to play an animation. It "works" because it changes the variables. But it doesn't change the position or rotation at all, anybody know how to fix this? I wasn't able to find other posts having the same problem. Please be quick because this is for a school project
     
  2. thecloudkeeper

    thecloudkeeper

    Joined:
    Sep 21, 2021
    Posts:
    28
    If you want useful help here, especially if you want it fast, I would recommend posting some pictures, code samples, a video or a more detailed description. Preferably all of the above! It's almost impossible to suggest a fix just from the information above.

    Are you using an Animator Controller? Are you setting parameters from code? Are you using Animation Events?
     
  3. BlockManBlue

    BlockManBlue

    Joined:
    Feb 10, 2021
    Posts:
    3
    I am using an animator controller, and I have monobehavior on there, it worked before but just stopped for some reason. I run the method that is supposed to play the animation: animator.Play("attack"); and it plays the animation, but it doesn't look like it. I've checked the animation, and everything is fine. But when it tries to play outside of me editing, it will run the events, change the test bool i put in, but won't change the position or rotation. Once i get home, i might try building the game to see if anything changes, i've had a reverse effect with that sort of thing, where it's fine in editor, but broken in build. so hopefully it'll be fine in build but broken in editor.
     
    thecloudkeeper likes this.
  4. Tabacohabano_Games

    Tabacohabano_Games

    Joined:
    Dec 16, 2020
    Posts:
    4
    Hi!
    Have you tried to set up these options for your animation clip at the import/animation tab inspector?
    upload_2021-11-2_10-40-23.png