- Home /
Imported Animations From 3DS Max
Hi, so I imported a 3ds max file (converted to a FBX first) and it did have an animation. I was wondering how do I use that animation in unity. When I place it in the scene view, it is at its first frame (which I want until I want it to reload). How do I play the animation? Thanks!
Notice the Take 001 in the prefab and the Animator component.
Answer by Seth-Bergman · Mar 16, 2013 at 04:11 AM
http://docs.unity3d.com/Documentation/Manual/AnimationScripting40.html
the docs are pretty good on this, take the time to read them..
Now, once you've put the model into your project, you can select it in the Assets panel, and then it's import data becomes available on the Project panel.. Select the animation tab at the top..
On the animation tab, I have selected the clip (highlighted in blue), which opens further info regarding the anim.. Here, you can rename your anim, and split it up according to keyframes if there are multiple anims on the same object..
Now, when you drop an instance of the object into the scene, it can be played as:
animation.Play();
if the object has multiple anims, you will play them by the name (as you set it, as described above):
animation.Play("walk");
for example... (as it stands, you could say for example "animation.Play("Take 001");" that would work..)
simple as that.. often we want to fade between anims, so instead we use:
animation.Crossfade("nameOfAnim");
instead.. check out the docs for more, such as blending and layers, etc...
Ok, so it seems to give me a console message saying "Default clip could not be found in attached animations list". What does it mean if I only have one clip in there? I am using animation.Play();
right below the default anim, change "size" to 1, then add the anim there too.. sorry I don't know macanim yet, there is probably a newer way to do this...
apparently you must also mark the clip as "legacy" for this to work, again this will be in the import settings (on the "rig" tab)
Ok that works, but now when the animation plays, it rotates the gun and moves a different position. Then when it stops, it also stays at that position. why is that happening?
you can change the wrap$$anonymous$$ode of the anim (in the start function):
animation["reload"].wrap$$anonymous$$ode = Wrap$$anonymous$$ode.Once;
that should fix it...
No, changing the wrap mode did not help, it still changes position and rotation when I reload and stays there when it is done. Any other ideas?
Your answer
Follow this Question
Related Questions
3ds max animation wont import. cant adjust keyframes? 0 Answers
BlendShapes Animations wont finish. 0 Answers
Importing animation from 3DS Max into Unity problem 3 Answers
How to make a player by 3dmax? 1 Answer
Texture import and animation problems 0 Answers