2
\$\begingroup\$

I have a character and I would like to animate a walking animation for it. However i get the following result when I animate it: enter image description here

(ignore the green lines/ markers/ sound) As you can see the foot animation is also being applied to the character with predictably bad results. I currently have one animation which applies to the entire character which the foot is a part of. This animation has two layers and can be seen here:

enter image description here

The real problem I am having is how does one get an animation to only apply to a section of the character? I know this can be accomplished with avatar masks but i believe those are only for 3d animations/projects (this is 2d) but if you can get this to work with 2d animations please explain.

The animation that I am using just changes positions, and rotations which is unfortunately applying to the entire object. It also should change the sprite of the feet however this is not taking effect. Ignore the fact that there is only one foot, the other was disabled but exhibits the same behaviour as is seen in the shown foot.

This is a 2d project.

\$\endgroup\$
  • 3
    \$\begingroup\$ Look at Unity's tower defence example. It is free to download from the assett store and will be able to put you in the right direction. Unity have a tutorial video that goes with the example project so it is all explained there \$\endgroup\$ – Savlon Apr 14 '14 at 0:49
1
\$\begingroup\$

As Savlon said, this can be done as in the Tower Bridge Denfense demo. Basically you just have to separate the feet from the rest of the body using the sprite editor (slicing the different parts of your sprite asset). The feet will be children of your main player object. After that, you just need to create a new walking animation for the whole character and animate the feet along the timeline.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.