Search Unity

(HELP) Trying to reset my characters animation without it happening all the time

Discussion in '2D' started by icarotkd, Oct 3, 2015.

  1. icarotkd

    icarotkd

    Joined:
    Sep 29, 2015
    Posts:
    16
    So, im gonna try to make it simple, im making a game that when the player holds the right mouse button, he can spin around, like this.

    https://gyazo.com/adb0ef0eba7d2373fa859abbd9d09ab4

    that works, right, BUT, as you saw, he never lands on his head, he's always lands on his feet, everytime he lands on his feet (on the ground check on his feet) he resets his position to the normal standing position, and THIS is what happens when he does land on his head.

    https://gyazo.com/2d19137b6150834776988ae9b228bab4

    he gets stuck on his jump animation, which makes sense, since the animation is suposed to be played when the ground check on his feet isnt activated.
    sooo, what do i do? the most obvious thing would make another ground check, but put it on his head, but the problem is that if i do that, he might bump his head on something from jumping, going up, not landing, and that would trigger the animation just the same...
    so, can anyone think of a solution here to help me out? i really thought a lot and dont know what to do, please help me!!
     
  2. Prototypetheta

    Prototypetheta

    Joined:
    May 7, 2015
    Posts:
    122
    Is the ground check bound to the sprite? Or can you have the two separated so that the ground check does not rotate with the sprite?
     
    icarotkd likes this.
  3. icarotkd

    icarotkd

    Joined:
    Sep 29, 2015
    Posts:
    16
    Sorry for taking so long to reply, for some reason i didnt get the notification...
    really sorry, but i fixed the problem by spliting the platform sprites, one is the ground, the other is the ceilling....