Well had no problems until now in exporting meshes from Max but now I need animation. It’s the first time for me to use this on Unity and I’m having some problems.
I have this prefab (you can download it) and there should be exported also animations and bones but when I try some command about play it says there is no anim in the object.
So, is this exported well and I don’t know how to call anims or anims are not exported for some reason? I can’t know that!
There’s some anim in the first 6 frames.
400725–13762–$mahand_01.rar (48.6 KB)
Everything works fine for me.
Maybe there is no default animation assigned in your object? Just try reimporting your object again and drop it into scene and see if it works.
Thank you for help Paulius!
How do you activate the animation? I tried a couple of commands like
using UnityEngine;
using System.Collections;
public class AnimPlay : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
animation.Play("all", PlayMode.StopAll);
}
}
But it keeps telling me that there is no anim clip with that name (“all”), but I defined it in the mesh import settings!
Just select your object (in the scene view) and find Animation component. It has animations listed under Animations. You can play any of the listed animations. By default animation is called “Take 001”. Try playing that.
Nothing… there must be something I do wrong but I can’t really find out what it is.
Here I enclose the imported hand, can you tell me what’s wrong? The animation clips are there!
Also, in the scene, I selected anim clip ALL or SCHICCHERA, and the hand is horizontal in editor, when I launch the game the hand turno down on one side by 90 degrees…
401474–13784–$mahand.rar (109 KB)
Sorry for boring all the forum but I really can’t come out of this… I attached a couple of -mov to show what the anim looks like in Max and what happens in Unity.
The anim is only in the first 7 frames, I don’t need smooth anims but only some hand positions and little more, at least for now.
Thank you.
Well I wanted to upload but even if files are just two rar of less than 6 MB it doesn’t allow… so I put them in DropBox and here are the links:
http://dl.dropbox.com/u/858716/unityhelp/IMG_0031.rar
http://dl.dropbox.com/u/858716/unityhelp/IMG_0032.rar
Bumping it up… sorry guys, this should be really easy to spot for experienced users… what is wrong in here? Or is it a bug with Unity3?
Animations store rotation and position. You need to make the hand a child of a different gameObject, and use that gameObject to control the hand’s position/rotation.
Your hand-spazzing-out problem is because when you play the animation it plays disjointed frames one right after the other. You need to set animation[“clip”].speed = 0.0, then set animation[“clip”].time = the exact time of whichever frame you’re using.
Thank you for help Vicenti, but at the moment I’m just using the PLAY AUTOMATICALLY checkbox in the hand object.
That should at least show me the SCHICC clip that I defined in the mesh import parameters… but the result really is totally different from what I have set up in Max.
Even if the hand is rotated by 90 degrees, that wouldn’t be a problem, the problem is that the bones are not matching my anim at all.
Isn’t PLAY AUTOMATICALLY supposed to play the anim I selected in the ANIMATION field at the right rate?
If so, why it’s not working?
I also changed bones in the QUALITY setting from 2 to 4 just to be sure that it wasn’t a problem of not enough interpolation but nothing changed.
HI
Could you mail me your Max file?