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 Scacchi · Mar 18, 2013 at 04:26 AM · animationerrortimerangeout

Strange error with animation: "Time is out of range"

Hello, the thing is I have a character controller script that works with Rigidbodys, once I had it completely coded, I wanted to add animations. I started with the "Run" and "Jump" animation... So this is what I have in that part of the code:

 if (CanJump && Input.GetButton("Jump")) {
                 rigidbody.velocity = new Vector3(rigidbody.velocity.x, CalculateJump(), rigidbody.velocity.z);
                 animation.CrossFade("Jump", 0.5f);
             } else {
                 animation.CrossFade("Run", 0.5f);    
             }

The thing is, When I pess space (Jump) the character makes the Jump Animation, but when it is in the last frame (Or almost the last one, I dont know) I get this error:

Time is out of range: 1.346396 < 1.333333

The first value given is always random... Does anybody know why this happens? It stops My entire game, and I cant keep playing.

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 lighting · Mar 18, 2013 at 07:55 AM 0
Share

From code point of view it's ok. Please look at animation (fbx) file if it doesn't have any errors or if it have been properly imported into Unity.

avatar image Scacchi · Mar 18, 2013 at 05:46 PM 0
Share

Apparently it is correctly imported, it doesnt show any errors, how can I know if it is good or not?

Oh, I forgot to tell you, the code is in a FixedUpdate, If I change it to Update ins$$anonymous$$d, the animation works for 3 or 4 times, then it throws the same error, I dont know what else to do.

avatar image Scacchi · Mar 21, 2013 at 03:46 AM 0
Share

Does somebody knows how to solve the problem? Im going mad!!! I cant find the solution and In google nothing shows up!

0 Replies

· Add your reply
  • Sort: 

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

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

IndexOutOfRangeException 1 Answer

AnimationEvent has no receiver, but there is no AnimationEvent 1 Answer

Fast-forwarding an animation to its last frame 2 Answers

Gun script help 1 Answer

install Animation Riggit 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