Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Pablomon · Aug 10, 2017 at 09:57 AM · animator controllerfsm

How do you combine Animator and fsms

So, I have implemented a basic state machine for my character. Now I want to animate the sprite character and I can think of three ways of doing it.

  1. I replicate the states and transitions in the animator controller. I assign a bool or trigger condition for the transitions that I change from my fsm state scripts. I.e. The fsm is in move state, the player releases all keys so I change the bool "to_Idle" ( that is a condition of the transition from move to idle states in unity animator ) from my move state script. The animator controller condition "to_Idle" is now true so it transitions to Idle state. While this works it means that I have to work two times and any change in my fsm states has to be replicated carefully in the Animator controller.

  2. I replicate only the states in the animator controller and have them all transition from any. This way only my fsm takes care of which states a state con transition to. I tested this with few states and it works but I see that is not how the animator was intended to be used.

  3. Using state behaviours. I didn't try this, but would it be posible to use behaviours scritps to manage the logic of your states ?

How do you do it ?

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Senuska · Aug 10, 2017 at 01:29 PM

Your first point is the most commonly implemented FSM animator. If you decide to go with this path I would draw out all the states before hand, and keep a document handy to keep track of any changes you have made.

I have not seen the second point done very often, but it may lead to some unexpected behavior.

You can change states in a Monobehavior script (AnimatorStateMachine), but then that just cuts out the Animator entirely.

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
1

Answer by theANMATOR2b · Aug 10, 2017 at 08:16 PM

Here are some useful video tutorials using Playmaker

https://www.youtube.com/watch?v=xJSMQutHtIQ&list=PLFXYYxmSM-GecKCLR506o_87B3jmZ_oIz

https://www.youtube.com/watch?v=Ox1RHWh9gRI&list=PLFXYYxmSM-GecKCLR506o_87B3jmZ_oIz∈dex=4

https://www.youtube.com/watch?v=iA0BRFXgLFs&list=PLFXYYxmSM-GecKCLR506o_87B3jmZ_oIz∈dex=3

https://www.youtube.com/watch?v=U0zWHVnpx-w&list=PLFXYYxmSM-GecKCLR506o_87B3jmZ_oIz∈dex=2

https://www.youtube.com/watch?v=49mly6zVAFg&t=5s

Otherwise - idk.

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

69 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

Related Questions

Mixamo animations do not play in inspector 0 Answers

why does an ChildAnimatorState position property not accept a new value 0 Answers

Beginner using the animation controller to get a sprite walking left and right..Need some help going from here 0 Answers

Animations playing twice when transitioning 0 Answers

unity animator transition keeps transitioning to beginning of animation 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