• 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 Paximillian · Dec 21, 2014 at 07:16 PM · animationmecanim

Animator transition doesn't start until the current animation ends

Hello,

So, I'm having this problem with the mecanim system, I have a idle-walk-run state machine that's suppsed to trigger between the acceleration, decceleration, running loop and idle state.

I have 2 transitions going out of the acceleration clip: 1 is to the running loop using exit time as a condition, and the other straight to deccelerating with the condition that we're not running anymore if the acceleration animation is still going.

The problem is that even when the acceleration-decceleration transition will only start after the entire clip is complete and not when the conditions change.

Am I missing something about how the system works? Is there a special step that needs to be taken to transition from the middle of a clip?

The weird thing is that the idle-anything transition does transition even from the middle of the animation clip.

Thanks for any replies.

Comment
Add comment · Show 5
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 tanoshimi · Dec 21, 2014 at 07:25 PM 0
Share

How much blend time have you got between the two states? Is the condition marked as atomic?

avatar image meat5000 ♦ · Dec 21, 2014 at 07:25 PM 0
Share

You can remove or reduce exit time parameter. Check transitions are not 'Atomic'; Which for some reason means they can't be interrupted.

avatar image Paximillian · Dec 21, 2014 at 07:42 PM 0
Share

All transitions are marked as not atomic, and the exit time parameter is removed on the problem transition. I'm not exactly sure how to check the blend time, but it's rather short, and isn't really the problem since it finishes correctly, the problem is that the animation it blends into doesn't let me transit again before it finishes a cycle.

avatar image meat5000 ♦ · Dec 21, 2014 at 08:06 PM 0
Share

Check the transition 'from' the problem state.

avatar image Paximillian · Dec 21, 2014 at 11:38 PM 0
Share

alt text Here.

The selected transition is the transition from the problem state. As you can see, exit time is removed, and atomic is unchecked. Running is a boolean that just states if movement was executed this frame, and run transition is a float that is clamped between 0 and 1 and is used to both deter$$anonymous$$e the acceleration/deceleration duration as well as a small drag after the actual movement of the script.

Both variables are changed correctly when the game is running.

animator.png (208.9 kB)

2 Replies

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

Answer by bryon · May 12, 2015 at 09:20 PM

You have to set "Has Exit Time" off to transition in the middle of a clip. http://docs.unity3d.com/Manual/class-Transition.html

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 Paximillian · May 12, 2015 at 10:36 PM 0
Share

How about that... That's a new feature they've added then, I didn't have the option in the version of Unity I used when I posted the question(As you can see in the picture above). Thanks for letting me know, mate =)

avatar image
0

Answer by Josenifftodd · Dec 22, 2014 at 12:55 AM

Don't know if this is useful but when I set up player movement I make it so they is a speed float in the animator and then make it so that left is -5 and right is 5 and they is 0 where they do nothing. then I make the input key from left and right a VAR and then when I press they keys after putting the input code.

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 Paximillian · Dec 22, 2014 at 12:56 PM 0
Share

Not quite. $$anonymous$$y plan is to just mirror the animations when running the other way, which would mean state changes between 0-5, and when anything above a 0 results in transition, a bool is enough.

Regardless, I don't see what this has to do with the issue?

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

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

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

Related Questions

Reference clip for Additive blending animation in Mecanim 0 Answers

Setup specific frame of a sprite animation and stop the animation there 0 Answers

Can I make animations snap to a frame? 1 Answer

mecanim keep feet planted 0 Answers

Scale assets AND Mecanim animation Keyframes? 1 Answer


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