- Home /
Animator Cannot Get Rotation Right (Unfinished? Rounding error?)
Hi guys! I have a problem with Animator that's been bugging me for weeks. I've spent so many hours trying to resolve it that I'm starting to be desperate.
We are working on turn-based game with characters moving within fixed grid. The characters have to move exactly from the center of previous square to exact center of the next one. After a lot of thinking and tweaking we were able to almost perfect the walking animation (so some smoothened correction is completely acceptable), but the rotation is pretty much a nightmare.
Animation rotates the character exactly 90 degrees. Not more, not less.
Both sides of the rotation clips have safe areas with fixed root node that is being used for animation blending/tweening - just to be sure that none of the rotation is cut out by the idle state.The rotation only happens inbetween.
We have tried to open the exported FBX in 3ds max again, and it turns exactly 90 degrees.
When imported to Unity, it can do about 89.15 degrees (i.e. turning from 180 to 269.1519), resulting into annoying corrections after every single rotation. We have to do those since otherwise the character would walk in angle and miss the center of the other square.
The clip settings are attached - we always bake the things we don't use, so it doesn't collide with - the correction system (Y translation for everything, rotation for everything but Turns and XZ for everything but Walk). If we don't, it gets even worse.
We have also tried to animate geometry to see whether it is wrong in the preview window as well. And it is (as attached).
Currently, we use Unity 5.0.0b19 (64bit), but the issue was around ever since 4.5 (32bit).
Do you, please, have any idea how to resolve this? Thank you so much!
EDIT: We found out, that in Unity 4.5, if we wiggle around with the safe zone, we can get exact rotation (we need to use longer safe zone, but only use a half of it). However, the very same settings do not work in Unity 5 :-(.
Answer by meat5000 · Jan 26, 2015 at 02:25 PM
I use animations without compression. I have tried $$anonymous$$eyframe Reduction and Optimal with 0 Rotation Error and it didn't help. However, I'm adding one EDIT that might be a little helpful.