x


I'm having animation problems

I can't seem to get animations to play in Unity. This is the workflow that I used.

-Character modeled in 3ds Max 7 and is rigged with biped and uses skin.

-I downloaded 3 biped files (walk, run, standby) and applied them to the character model

-I exported the character as a .fbx file using 3ds max 2011 using default export settings

-I edited the animation so it was facing the correct direction and would walk in place in Motionbuilder 2011

-I then added the model to my Unity assets

-I set frames 0 - 32 as "walk" and 50 - 90 as "idle" and set both of their WrapModes to "loop" and left everything else the same

-I deselected the "Play Automatically" checkbox

-Then I added the following script to the character

//Taken from //http://unity3d.com/support/documentation/Manual/Animation%20Scripting.html

function Update () {

if (Input.GetAxis("Vertical") > 0.2)

   animation.CrossFade ("walk");

else

  animation.CrossFade ("idle");

}

Now when I click play nothing happens. I can push the arrow keys and WASD keys and nothing happens. When I check "Play Automatically" The walk animation plays on a loop without any keys being pressed, and pressing keys does nothing. I've tried multiple things, but can't seem to get it right. Anyone have any suggestions?

more ▼

asked Jan 05 '11 at 03:00 AM

Ben 20 gravatar image

Ben 20
53 11 13 17

I can't really see anything wrong with what you told. Try putting some Debug.Log in your code to make sure it is executed. Or post your project here - maybe someone will figure out.

Jan 05 '11 at 10:27 AM Paulius Liekis

Post the whole script not the snippet for us to see which part causes the problem.

Jan 05 '11 at 01:26 PM uhahaha
(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3807
x55
x43

asked: Jan 05 '11 at 03:00 AM

Seen: 746 times

Last Updated: Jan 05 '11 at 03:00 AM