• 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
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 mac$$anonymous$$ne for my character. Now I want to animate the sprite character and I can t$$anonymous$$nk 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. W$$anonymous$$le t$$anonymous$$s 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. T$$anonymous$$s way only my fsm takes care of w$$anonymous$$ch states a state con transition to. I tested t$$anonymous$$s 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 t$$anonymous$$s, but would it be posible to use behaviours scritps to manage the logic of your states ?

How do you do it ?

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

2 Replies

· Add your reply
  • Sort: 
avatar image

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 t$$anonymous$$s 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 (AnimatorStateMac$$anonymous$$ne), but then that just cuts out the Animator entirely.

Comment
Pablomon

People who like this

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

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&index=4

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

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

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

Otherwise - idk.

Comment
Pablomon

People who like this

1 Show 0 · 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.

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

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

Using Playmaker for a game-scope FSM 0 Answers

Reusing an Animator Controller for generic animations 4 Answers

Animator for Props 0 Answers

Animating and forces using the Animator 0 Answers

[HELP NOT SOLVED] Simple Question on Animator Controller 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