I’m trying to get an NPC to walk around, and I figured that the best place to start would be the robot AI script (and the associated AIAnimation script). The NPC has two animations, walk and idle. I edited the AI script to reference only those animations, and I have the NPC moving around. However, he’s skiing because the animations aren’t playing.
Here’s what I’ve checked so far:
• The animations: they work fine when just instantiate them on their own.
• My modified AI script doesn’t cause any errors when attached or at runtime.
• Tracing: debug statements next to the animation.CrossFade() calls are being reached.
The character doesn’t animate, and I’m not sure where to look next. I have a robot in the same scene using the original AI scripts, and the robot is working fine.
Make sure your character animations work correctly, without any scripts.
Just drop him into an empty scene, make the animation you want to play the default animation (In the animation component) and hit play.
Yep, they work fine on their own.
Do you get any errors in the console when using the script? Maybe one telling you of a missing animation?
No errors at all. But Debug.Log() messages next to the animation calls show up, so the methods are being called.
I’m watching this thread eagerly. I ma wondering how many Unity users have successfully used Cinema4d to import animations using the method used for the robots in the FPS tutorial. Anybody have any luck?
Hard to tell whats going on without a specific example. Send in your project folder via report bug.app. And i’ll take a look at it tomorrow.
The different .c4d files you have, use completely different node hierarchies.
See the screenshot, in the one file the first child is caleld “old man baked” in the other one it is called “root”. In one file you have a cube in the other you don’t, so Unity creates a wrapper root around the two objects. You could probably solve the issue by removing the cubes or adding the cube to all .c4d files and not just to some.
When connecting animation clips from differnet files, unity finds the nodes to animate by name, so if the hierarchy is different, the animation will be ignored.
Another way, which is probably better than one file for each animation is to use the animation splitting in the import settings.
This way, you can have all your animations in a single .c4d file. In the import settings you then setup clip names and their ranges. Unity will then generate all the animation clips for you and you never run the risk of having two different node hierarchies.
http://unity3d.com/Documentation/Manual/Character-Animation.html

Right, thanks. I knew it’d be something simple I’d overlooked.