- Home /
Gettings Animations in LocalSpace (Parenting Not Working)
Hello everyone, I'm having massive problems trying to make animations work correctly in Unity.
I've seen a lot of posts about "make a parent and then the child containing all the parts will move locally to it", however most of those posts are old, or are dealing with the legacy system. Either way, trying combinations of parenting / resetting position is not working at all for me.
What I notice happening: In Blender, animating in Pose mode sets the animation space to 0,0,0 locally, so all Pose mode animations are local in Blender, even though the actual world location could be anything.
In Unity without parenting, the object jumps to 0,0,0 in world space(but it really does not). It jumps from the place that it is currently in world space, offsetting itself by the World space from Blender and displays it as 0,0,0 (the local space in Blender).
In Unity with parenting, the object still adds its offset from Blender's world coordinates to where the master parent is (and still displays its location at 0,0,0 .
Additionally, added game objects do not follow the animation (even with root motion) and in fact, root motion is not causing any of the transforms to move either.
I really need help on this one if anyone knows what to do.
Have you checked the origin point of your object in blender? The jump should not occur and the fault probably lies in the way you animated your object in blender or the way you imported the object. If you move the object around in edit mode and then start to animate it, the object will jump in Unity. This is because movement occurs relative to the local origin of the object. If your animation starts relative to that local origin, the object will see$$anonymous$$gly "jump" from its position
In short: is the local origin of the object in blender where you want it to be? :)
Yes, definitely - the objects that are animated have the correct origins inside Blender.
It has to have something to do with the local bone position vs world space problem (which theoretically could be fixed by animating everything @ world position 0,0,0 (but that would be a big hassle and still not solve the root motion problem).
Any code or project to share? Or some instructions on how to replicate the problem myself? It's hard for me to imagine what's happening.
Yeah, if you think it would help, I can create a slimmed down version of the project to show the problem -- but I'm going to sleep so it won't be up until tomorrow...well...hang on...
http://rg.to/file/4007ad4bdb85d3c854875264d7a33af9/Animation_Problem_demo.unitypackage.html
I stripped most of the junk out.
Your answer
Follow this Question
Related Questions
How to use the imported animations from Maya in the animator controller? 0 Answers
Turn based game animation through mechanim 1 Answer
Camera returns to starting position after playing animation 2 Answers
How to switch Idle animation within a blend tree? 1 Answer
Do animation rotations refuse to accept negative values? 2 Answers