• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Johny_G · Jan 26, 2015 at 02:18 PM · animationanimatormecanim

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 :-(.

unity-animator-difference.png (69.7 kB)
unity-animator-clip-settings.png (45.8 kB)
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by meat5000 · Jan 26, 2015 at 02:25 PM

alt text


inspectorerror.jpg (55.9 kB)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Johny_G · Jan 26, 2015 at 05:27 PM 0
Share

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.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Mecanim issue: Twitching when blending into blendtrees 1 Answer

Mecanim Npc control 0 Answers

Animation Events and Mecanim 0 Answers

What is the proper way to wait for an Animator Controller to update? 1 Answer

Is there a way to optimize animators? 3 Answers

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges