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\$
2
  • \$\begingroup\$ go into the animation and delete anything that has the characters position recorded. \$\endgroup\$ Commented Apr 22, 2019 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
    Commented May 23, 2019 at 14:31

2 Answers 2

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\$
1
  • \$\begingroup\$ Thank you, i figured it out by myself in the meanwhile but thats the absolute correct answer. \$\endgroup\$
    – MBrain
    Commented May 25, 2019 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\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .