Search Unity

Animation problem in top-down 2d tutorial

Discussion in 'Animation' started by c01dm00n, Sep 25, 2014.

  1. c01dm00n

    c01dm00n

    Joined:
    Sep 11, 2014
    Posts:
    4
    Hi All

    I followed this video: http://unity3d.com/learn/tutorials/modules/beginner/live-training-archive/top-down-2d
    and I set up attack animation via transition states. It goes from "Any State" to "Attack State" if Attack trigger is set, and then goes to "Idle" state. It works as expected apart from when I start the game the animation goes directly to "Attack State" and plays it once. It looks like the Attack trigger is internally sitched on or maybe "Attack State" is where it starts. Either way that's not what I want.
    Attack trigger is disabled in the editory and there is not code that triggers it. Do you know what may cause the problem?

    Thanks
     
  2. c01dm00n

    c01dm00n

    Joined:
    Sep 11, 2014
    Posts:
    4
    Solved by setting Idle to be default and then creating conditional transition to attack state.