Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • 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 nick4T2 · Dec 09, 2011 at 04:31 PM · animationrotationanimationclipnan

FIXED - Editing animation clips gives NaN on rotation value

Hi all,

I have a waving animation which I'm trying to edit. So I duplicate the clip (.anim file) so I have a non read-only clip I can edit in Unity.

I edit some keyframes on the arms to make them stick out more so they avoid clipping through the waist - however I notice a flicker right at the end of the loop. On investigating the frame further, I noticed that the Y rotation for the arms was returning NaN, making the arms dissappear on that frame.

I tried deleting the last keyframe (the one which was returning NaN) and the problem ocurred on the "next" keyframe -ie what was the second to last (and now last) keyframe. It always occurs on the last keyframe on the anim clip.

I only moved the frames a little bit - there are no crazy jags or spikes in the anim curve. I can't think whats causing this and would really appreciate any advice - it would really help my workflow to be able to edit anim clips in Unity.

Comment
Add comment · Show 3
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 nick4T2 · Dec 09, 2011 at 06:25 PM 0
Share

Did some further experimentation and it appears moving ANY keyframe creates the NaN error on the selected bone (ie moving a keyframe on the arm means the last keyframe on the arm returns the NaN value for Y rotation, makes the arm disappear, and makes Unity crash if triggered at runtime). Any help or anyone experiencing the same problem, I'd still be most grateful.

avatar image nick4T2 · Dec 12, 2011 at 02:35 PM 0
Share

Update - console gives the following error message when running through the clip in Editor - Quaternion To $$anonymous$$atrix conversion failed because input Quaternion is invalid {-1.#QNAN0, -1.#QNAN0, -1.#QNAN0, -1.#QNAN0} l=-1.#QNAN0v

Still need help if anyones out there?

avatar image nick4T2 · Jan 05, 2012 at 10:40 AM 0
Share

Update; it appears that before editing keyframes, you can convert interpolation from Quaternion to Euler on the curves you need to edit. End keyframe then no longer seems to return NaN.

However this still isnt the ideal solution as converting the Quaternion curves to Euler produces very different looking animations which are full of spikes, so heavy editing would be needed anyway. Still looking for a solution to this. Have raised a bug ticket with Unity but no response so far.

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by nick4T2 · Jan 10, 2012 at 05:19 PM

The Unity 3.5 beta addresses this issue.

Comment
Add comment · 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
0

Answer by mrlemonyfresh · Aug 10, 2017 at 01:21 AM

@nick4T2

Nope. It still happens in the latest version of Unity.

(currently looking for a fix.) This happened when I tried to parent an animated object in a program before bringing it to Unity. It worked fine un-parented. As soon as I parented it, it would no longer accept the animation.

Moral of the story; ???

Comment
Add comment · 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

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.

Follow this Question

Answers Answers and Comments

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

FBX Animation Clip Root Transform Rotation ignored in WebGL v2017.1 0 Answers

How to rotate an object using animation clip in opposite direction? 1 Answer

Run smooth continuous rotation animation of spinner using animator 1 Answer

Lerping smoothly between animation and new position 2 Answers

Animation problem with rotation and position. 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges