0

I'm currently building a 2d platformer and encountered a few problems.

My player has a script so that when the player hits a cube with a rigid body, the cube can be pushed. When the character pushes the object, the regular walking animation is displayed.

I want to play the pushing animation at that moment but cant seem to fix it. I read a lot of topics on the internet about the difference between unity new Animator editor and the older versions.

Is there a simple way to trigger the animation on hit, and how do I have to add it in the Animator? Also with witch states should it be connected?

Renaissance
  • 798
  • 5
  • 15
Quincy Norbert
  • 431
  • 1
  • 6
  • 18

1 Answers1

0

Found it on google, maybe it will help

http://unity3d.com/learn/tutorials/modules/beginner/2d/2d-overview

He uses a Layer for the animation of the cannon so he animates regardless of the body animation.

Vaibhav
  • 703
  • 1
  • 7
  • 18