Search Unity

Child sprite animation not moving correctly

Discussion in 'Scripting' started by OldenErwanin, May 10, 2020.

  1. OldenErwanin

    OldenErwanin

    Joined:
    Mar 26, 2020
    Posts:
    31
    Hi!

    I would like to create an animation for a child object(sprite), and when I play it in the Animations window, it's correct, but when I try to play it in the Animator window, or in the Game window, it's just a messed up animation. Can someone tell what can be the problem?
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,674
    Animations are pretty straightforward. Usually you put the animator at the root of the hierarchy you are animating, and all animations refer to GameObjects by their name. Take a step back and make a new Animator and some Animations to drive an extremely small demo scene, or else work through some more tutorials.