- Home /
Animation preview not working for model with generic rig and root motion. Is this a bug?
I'm having a strange issue with previewing the animations of a model with a generic rig and root motion. Can anyone tell me whether this is a bug or whether I'm doing something wrong?
The import seems to be fine. I can preview my model/animations initially, but when I select the root bone/node the previewer replaces my model with the default Unity humanoid character, as illustrated here:
It also only seems to be a problem with generic rigs and not humanoid ones. I'm only using a humanoid model here to test the work-flow, but I'm using the generic animation type as I need to eventually import non-humanoid characters.
It might only be a previewing issue as I can set up the character in a scene and use the animations with root motion with no problems. But previewing a blend tree, for example, has the same issue.
The only other piece of information I can give is that when I try to play an animation in the preview window I get the following message in the console each frame:
Look rotation viewing vector is zero UnityEditor.DockArea:OnGUI()
This question seems to be similar to mine although I'm not sure I understand the answer. Is there somewhere else I need to select the generic animation type other than the 'rig' tab?
Is there anything else I could be doing wrong that might be causing this? I haven't been able to find anything in the documentation or elsewhere online other than the above question.
Thanks in advance.
Answer by meat5000 · Feb 15, 2016 at 06:20 PM
Tried dragging a different model to the preview box?
Yes that works! Though, I'm ashamed to say I had no idea you could do that. Well I'm just glad that it was an easy fix. Thanks very much for the help.
Am I right in saying this isn't working as intended though? Seems odd to have to reassign the model only for generic rigs with root motion.
I think its a bug or otherwise broken coding. The behaviour has changed throughout the builds. I did have the same gripe as you with Unity 5 builds in general. Sometimes dragging the model doesnt work either and that is something I havent gotten around yet.
I'd been working in 5.0 for a while and hadn't noticed the problem but updated to 5.3 to try to fix another issue. That's when I first came across it. Also tried 5.2 but got the same results.
Anyway thanks again for answering this, I really appreciate it.
Had the problem that after fixing scale of a model, which I imported with wrong scale first, my preview for my blend tree became huge. Guessing 100x. It was correct everywhere else. dragging the model to the preview fixed it! Feels like a cache problem.
Answer by Kurdle_4855 · Feb 16, 2016 at 12:56 PM
The animation needs to have the same rig as the model (if the model's rig is generic, the animation's rig needs to be too). Check and make they're both the same, that should fix your problem.