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
2
Question by Merkys · Jun 10, 2014 at 06:47 PM · animationanimatorframes

Why animation only play first few frames

Hi, I'm trying to animate my character with animator, and until today everything was fine, but something happened, i don't know if it was me or not, when playing animation it shows first 3 frames, then loops around. Everything fine with animations, that were created using "Blend tree", and others just decided to quit working.

pls halp...

Comment
Add comment · Show 2
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 Ben-Stoneman ♦♦ · Jun 11, 2014 at 02:41 PM 0
Share

So all the animations in the animator are separate and must be linked by conditions. how does it know when to play the jump animation or the run animation?

Can you tell us more about your animator's setup?

avatar image Merkys · Jun 12, 2014 at 05:24 AM 0
Share

Yes, all animations are separate and linked with conditions. For example running animation: "Any state" --> "Running" i got paramater Speed in animator, and in code i link my characters rigidbody2D velocity on x axis to animator parameter "Speed". Then in transition from one state to another i use condition, like Speed | Greater | 0.01 | That means if i my character is moving in any direction animator makes transition and it starts to play animation. But recently my animations fckd up, i tried making new animations + creating new project, but every time it's the same: almost all animations play just 3 or 2 frames then loops.

$$anonymous$$aybe i missed something while creating animations, but i don't know what it is :)

3 Replies

· Add your reply
  • Sort: 
avatar image
12
Best Answer

Answer by Merkys · Jun 13, 2014 at 10:51 AM

OK, because i found an answer myself, I'll write it not as comment, so it will be easier to see. For animations to work properly (except which are made by blending tree), transitions mustn't be from "Any state", because that means the state itself. For example if using "Any state" --> "Running" and transition goes with condition that speed is greater then 0.01, when your object tries to move in any direction it plays only first frames of animation, because that animation won't have time to play properly. And that happens because when condition is true animator through transition tells it to play, but transition comes from "Any state", it means from the same animation you try to play, and it goes in cycle never finishing animation.

P.S. if someone need clearer explanation, ask. I'll try my best.

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
21

Answer by seanyoncraic · Jun 02, 2015 at 12:59 PM

I fixed this by doing: Open Animator panel - select the transition between Any State and the state that is not playing correctly. Expand Settings in inspector and deselect "Can Transition to Self"

Comment
Add comment · Show 3 · 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 MehriC · May 15, 2017 at 01:52 PM 0
Share

omg thank you, you saved me for not getting a freaking certificate :D

avatar image mws75 · Jan 09, 2020 at 04:49 PM 0
Share

This worked like a charm, though I wish I knew why it worked. I am guessing because we uncheck the box we are saying "if the transition is going go be back to the same animation ignore" so that it can play all the way through. If the box is checked then it interrupts the current animation to go to the next animation, which just happens to be the same one, creating the visual effect of the animation getting stuck on a single frame.

avatar image CrisAhmad mws75 · Jul 16, 2020 at 02:30 PM 0
Share

It works because when you are transitioning from Any State to your X state, the condition is always set to true so the animation keeps getting triggered and never gets to play until the end.

avatar image
0

Answer by pooja-vincit · Dec 29, 2017 at 06:20 AM

@ seanyoncraic : This worked like wow.. I was so damn frustrated why this is happening :)

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

27 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2D Animation does not start 1 Answer

Frames per second not showing,Animation frames not showing 0 Answers

Damn, HOW CAN I KNOW, IF MY 2d ANIMATION SPRITE IS FINISHED??!! 0 Answers

Generic Avatar in Mechanim...not working. 0 Answers

How to play an Animation only once from my MachineState Animator? 2 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