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 /
This question was closed Feb 16, 2015 at 01:35 AM by meat5000 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by RealMTG · Feb 14, 2015 at 09:39 PM · animatoraicharacter controllerfloat

Animator changing state changes when triggered when it should change on float change

Hi!

So I have this AI. It is using a Character Controller to move and to animate my AI I've set it so it uses the CC velocity. So in my animator I have it to transition to walking when the velocity is greater then 0.1 and go back to idle when it is less then 0.1. The value is being set but the AI doesn't change state. I also have this blinking mechanic. It is a simple trigger called "Blink". And for some reason whenever that is triggered the AI animation state changes. So if I disable that it never changes. I have no idea why it does this and it have never happened before. What could be the problem?

If you need some code, here's some of the variable setting

 //Sets the velocity variable.
 anim.SetFloat("Velocity", controller.velocity.magnitude);
 
 //Makes the AI blink.
 anim.SetTrigger("Blink");

 

And yes, the velocity is over 0.1 before you ask.

Thanks in advance

Comment
Add comment · Show 9
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 RealMTG · Feb 16, 2015 at 12:34 AM 0
Share

Do anyone know the answer to this?

avatar image meat5000 ♦ · Feb 16, 2015 at 12:37 AM 0
Share

Perhaps post some screeners of your transitions inspectors.

avatar image RealMTG · Feb 16, 2015 at 12:43 AM 0
Share

@meat5000

alt text

Here's a screenshot of the most important transitions.

I will also add that every time the blink trigger is called the AI tries to play the walking animation so it looks like it is twitching.

transistions.png (40.7 kB)
avatar image meat5000 ♦ · Feb 16, 2015 at 01:13 AM 0
Share

Does you idle -> walk transition work if there is only an exit time parameter?

avatar image RealMTG · Feb 16, 2015 at 01:16 AM 0
Share

@meat5000 Yes it does.

Show more comments

1 Reply

  • Sort: 
avatar image
0
Best Answer

Answer by RealMTG · Feb 16, 2015 at 01:28 AM

As it turns out it was mostly a Unity error. I just changed the animator to something else and changed it back and it worked. I have no idea how or why but I am glad it did.

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 meat5000 ♦ · Feb 16, 2015 at 01:34 AM 0
Share

Sometimes making changes requires the Animator to be 'Rebound'. This is a simple command and the editor will do it for you in most cases.

$$anonymous$$ostly though, people forget to click the object they are trying to observe.

A lot of errors come from the use of the Any State. These include strange self-looping and similar effects.

As soon as Blink has finished transitioning it will be classed within Any State and transition again to Blink.

Follow this Question

Answers Answers and Comments

20 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

Related Questions

Player with CharacterController come in collider in Unity 4.3.1 0 Answers

Zombie AI Lag when checking if it should jump 1 Answer

uNet implementing bots with max players per connection 0 Answers

how to make 2d character jump? 0 Answers

Can Mecanim/Animator be used to make Enemy AI's? -1 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