Animation... Unity 3D...Blender...3rd Person

Hello, I have a fully rigged, and animated 3D Model for my 3rd Person game, and, when i import the model into Unity, and play it, setup character controls and camera controls, it does the animation for 3 seconds, then stops and when i press W to move forward, it just glides and does not do the animation, Could someone please give me a script, or code, or something so i can fix that? Thanks!

Here is my Character Control...

Character Control Code

Any help would be very appreciated, thanks!

Looking at your script, it looks like you only have comments saying //invoke walk animation here. etc...

Unless I am missing something, you need to replace those comments with the actual code to play the animation...

Something like...

  gameobject.animation.Play ("walk");

Hope this helps,


You need to actually call the animation to play.

 if(isWalking) {

 else if (moveDirection != {

 else animation.CrossFade("idle");

It also sounds like the loop mode on your animations is off. You probably have the setting on once when it should be on loop. To see the various options for looping click here. Depending on how you imported your animations do the following:

If you created a single animation in Blender and split it in the importer, find the animation in the importer and select loop as your wrap mode.

If you imported your objects using object@animation syntax, then, in the start function of your animation script add:

 animation["walk"].wrapMode = WrapMode.Loop;

This way the animation will keep playing forever instead of reaching the end of the animation and returning to the starting position.