• 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 /
  • Help Room /
avatar image
Question by Juneav · Jun 22, 2020 at 04:26 PM · inputmecanimcharacter controllertransitionblend tree

Character controller running stop animation transition

For some reason I cant upload images or files, but here's a link to a GDrive folder with them Hello, hope you all doing ok! I've come to ask about this problem I have and I cant find a way to figure it out. Im trying to build a third person "open-wolrd-like" character controller using blend trees and specific animation motions. My goal is to achieve an Uncharted, MGS V, Death Stranding like character controller. So far I have idle animations, idle to walk and idle to run animations in -180, -135, -90, -45, 0, 45, 90, 135, 180 degrees directions, all merged using a blend tree, controlled by a script that gets the direcion the camera is facing, the direction the character is facing and the direction of the WASD/Axis input and it succesfully gets the desired angle to apply the corresponding animations in the blend tree. I have the magnitude of the input and I can use it to blend between animations for walking forward and running forward in another state. So far so good but noe the problem is that I cant figure out a way to exit the moving state (it contains a blend tree that blends between walking and running) to a running to stop state also, depending on the foot that was forward at the moment the transition should happen. I have the corresponding animations in their corresponding states, but I cant find a way to correctly trigger this transition. In most cases, input the magnitude is involved and turns out if fades back to 0 way too fast for the transition conditions to met. I've tried this:

  • If certain amount of input magnitude is reached, lets say 0.75 then the character is running, blending works OK.

  • If the above condition is met, start a coroutine that checks every 0.25 seconds if the input magnitude has changed from 0.75 to something below 0.25. If this condition is true, set an animator variable to trigger the transition from the moving state to the running stop state, there are two animations for this, stop with the left foot or with the right foot, which to use is controlled by a variable that does its job, so there is no problem with this.

  • There is a transition from moving state to moving start state controlled by the input magnitude and viceversa, this one works, if the input magnitude is greater than 0.1 then a moving start animation is blended and it blends from a moving start to a moving state, blending all the way from walking to running.

  • Tried with behaviours also, setting the coroutines on and off

And here is the problem: I can go slow or fast from idle to run, three states involved: idle, moving start and moving. I can ONLY go back from moving (walking or running blend tree) to idle or, heck, walking stop states (got them in place) if the input magnitude decreases slowly. BUT if the input magnitude is suddenly zero or lets say, 0.2, the state goes back to walking or idle, INSTEAD of triggering a running stop state, THIS IS THE PROBLEM. I've changed the priority of the transitions and tried with coroutines to check states or speeds, even tried using a locking variable, but no luck so far. Any help is greatly accepted, maybe the solution is obvious but I cant figure it our, maybe Im complicating stuff. Hope you can help, thanks in advance!

Comment

People who like this

0 Show 0
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

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.

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

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

Related Questions

BlendTree Animations Not Working On Horizontal Axis 0 Answers

How do you implement blend tree animation aiming in a third-person shooter? 1 Answer

3rd person controller- anim parameters are not changing when i press stuff 0 Answers

Two Cloned Objects with the same Animator, only one object's transitions work 1 Answer

According player movement to multiple cameras 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