0
\$\begingroup\$

I play around with animations and unitys raw motion capture data asset pack. My problem is as followed:

I have an idle, walkforward and a runforward animation and play them based on the keyboard input. But i realized when i move my character backwards (using a movement script) but still playing the walkforward animation the character basically moves backward and forward at the same time.

So how can i play the animation but without actually effecting the position of the character?

Thank you

\$\endgroup\$
  • \$\begingroup\$ go into the animation and delete anything that has the characters position recorded. \$\endgroup\$ – Justin Markwell Apr 22 at 21:49
  • \$\begingroup\$ @JustinMarkwell that looks like it could be good answer, especially if you can elaborate a little on how to do this, in case OP is unfamiliar with editing animation keys. \$\endgroup\$ – DMGregory May 23 at 14:31
1
\$\begingroup\$

You should simply uncheck “Apply Root Motion” on your Animator component, or you could also go on each animation you are using and check the options that say Lock Position and Rotation.

\$\endgroup\$
  • \$\begingroup\$ Thank you, i figured it out by myself in the meanwhile but thats the absolute correct answer. \$\endgroup\$ – MBrain May 25 at 5:51
0
\$\begingroup\$

When recording the walk animation you want to adjust the models rotations while making sure the Positions are not being affected or it will want to move to that position no matter where in the world you are. In your case you can select the character and go into his animation window and remove the positions that are interfering.

I made a quick .gif example of a cubes position and rotation animating at the same time in the animation window and then after removing the position it leaves only the spin without moving position.

enter image description here

\$\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.