Animations Not Working Properly.

So ive animated my character in 3ds max 9 to run and ive made an FBX file and called it character@running.fbx and imported it to unity.

So far so good, so i hook up my character to the fbx file from the inspector and i press play and my character animates all wrong, only his feet(shoes) are moving and his legs arent even connected to his feet so its like his feet are moving on theyre own…

Ive done everything right i just dont understand whats going on… in 3ds max the legs and shoes are not attached for a particular reason i have, and i dont want to join them, but i dont think thats the problem, also i get this error…

http://img44.imageshack.us/img44/3084/47898258.jpg

Box10 is his legs if your wondering (well his whole body except his arms/head) Ive disconnected them to make the bones bend and turn properly, if i connect them it will look all messed up so thats not an option for me…

Also another problem was that i set running into a loop, so even when he stands still hes pretend running, how do i make him run, walk, and jump according to the keys, W,A,S,D, and spacebar ofcoarse.

Any idea guys? Thanks in advance.

bumpp… i really need helpp…

bumpity bump.

There’s no real way to tell what’s going on without access to the scene or model. The model could be incorrectly imported, your animation version could have bones where your main model does not, you could be attempting to animate each piece of the model separately but only have an animation component on one piece, etc…

Ive done like everything i can, I just dont seem to be getting anywhere at all… Ive animated my character in 3ds max using frames and saved them and imported to unity, ive tried importing both .fbx and .max but they give the same results, maybe cuz i have bones pro 3 plugin in my 3ds max, but i dont think thats the case… the result each time is the same, the shoes are moving but the legs arent attached to the shoes and the just stay stiff and dont move.

If its possible, I can give you my project and you can see for urself what is wrong…

When you exported your character as an FBX file, did you have AnimationDeformationsSkins enabled in the exporter dialog?

An easy check is to place your character in scene, expand it’s hierarchy and manually try rotating bones. If the mesh doesn’t move, your character didn’t export correctly. If they did move, most likely something is wrong with your animation, like inconsistent bone names.

This might help narrow things down so if you’re still having problems people will have an easier time helping!

1 Like

Yes i did enable that when i exported it, im also going to check the bake animation box too and see if that works.

Btw i dont know how to manually rotate the bones in unity, i can only do it in max, how do i do it from unity?

edit: Baking animation from 3ds max when exporting to .fbx didnt change anything, still same problem.

So any other solutions i can look into, im still stuck here and i cannot move any further T_T…

Sorry Artimese, I don’t have a solution to your animations failing to import correctly but as far as changing the animations as he moves, there are many ways you can do it.

You will definitely need to script and use the animation class. As far as choosing the proper animation to play.

You could:

var isJumping = false;
private var jumpTime = 0.0;

function Start () {
animation["jump"].layer = 10;
animation["idle"].layer = 1;
animation["walk"].layer = 1;
}

function Update () {

var curTime = Time.time;

if (Input.GetAxisRaw("Vertical") > .1  !isJumping) {
animation.CrossFade("walk");
}

else if(!isJumping) {
animation.CrossFade("idle");
}

if (Input.GetButtonDown("Jump")  !isJumping) {
jumpTime = Time.time;
isJumping = true;
}

if (isJumping) {
animation.CrossFade("jump");
}

if (isJumping  curTime > animation["jump"].length + jumpTime) {
isJumping = false;
}

}

You may not even need the first function, but it’s just there for good measure. The code above is just an idea, and is likely not the fastest or the best way but this is how I usually animate my characters.

Damn… can anyone write a few steps on how they animate so that maybe i can compare how i did it, i feel im missing something and im doing something all wrong.

Hi, I had some problems exporting animations trough fbx.
Consider this before exporting:

Try to bake all the bones, and clean the scene (no iks, constrains, helpers, scripts related to some bones…) THe idea is have every single bone baked (rotation/translation)I mean, every frame with a keyframe.
With this, export…we just need bones and the mesh, nothing more.

I hope this help.

Well i do have a feeling that the problem is the bones arent baked, but im not sure exactly how to do that, i mean when i exported into .fbx format i made sure it was baked, but im guessing theres another way to do it, because when i see the animations thru unity absolutly nothing bends or turns, only the feet itself circulates as if its hovering.

You need to click on your player to make his stuff appear in the inspector window, then double click on “Animations” to make the image I’ve included appear, and name each animation and identify the frame where it starts and ends. Then you can call on them with functions that look like this:

function Start () { 
	animation.wrapMode = WrapMode.Loop; 
	animation["take"].wrapMode = WrapMode.Once; 
	animation["reach"].wrapMode = WrapMode.Once; 
	animation["open"].wrapMode = WrapMode.Once; 
	animation["standToSit"].wrapMode = WrapMode.Once;
	animation.Stop(); 
} 

function StopAnim(){
	animation.Stop();
}

function Walk() {
	animation.CrossFade("walk", 0.3);
}
  
function Idle () {
	animation.CrossFade("idle", 0.3);
}

250012--8991--$forumresponse_193.jpg

Well thats not really the problem i have, i can handle all that stuff liek splitting animations into each frame, my prob is that it wont animate the right way, im not sure if ive baked the bones properly, cuz the legs dont even bend, only the feet move and theyre like moving but the legs are just standing still… thats my main concern and my main problem.

Oh wow well i figured out whats wrong with it, its because i use bonespro 3 to do my animation, because the regular animation of 3dsm is really bad and the textures get stretched… so i tried without bonespro 3 and it worked… but its not as nice as i want it to be, the textures get stretched and what not. So unity doesnt support bones pro, is there another way to make the animating a little more better?

Hey
I used physique in max to skin my biped. Get your mesh and biped aligned up as close to correct as possible, don’t forget feet and hands(zoom in), and then select your entire mesh and open modify panel and add a physique modifier to the mesh,click the attach to node button and click on the COM (center of mass) a diamond in the center of my biped. If everything went right, a panel should pop up to initialize. Click okay and your mesh is attached to your biped. Try moving the arms/legs and see which parts are not attached and adjust the envelope until all vertices are attached. The envelopes are in the menu that drops when you click the plus sign beside the physique modifier.(must have mesh selected) There is a yellow wire skeleton with x’s on it, click on the x’s to select the different envelopes. Then adjust the radial scale. The envelopes will get bigger and smaller. You can also select rigid or deformable active blending depending on your needs, but you might not need that.
Hope that helps, sounds complex but just follow it step by step and it’s pretty easy.

The most efficeint way I have found to handle animation of charachters has been to save the animation file. Either if you have a biped, the .bip or else <select everything- file menue- save animation and then key every fram button there if you’d like to bake the animation. Plus it’s right there to use in motion mixer. You can also bake animation by selecting the Bake Animation option whe your exporting .fbx

Neither “yes” nor “no”. Unity isn’t aware of “Bones pro” (I assume this is some kind of plugin for 3dsmax) and it shouldn’t be. If you can export the animation to fbx and load it back to 3dsmax successfully, then Unity should be able to load that file too (unless your plugin fails to load when running 3dsmax in background mode).