- Home /
State Machine Component Based Action System
TL:DR Should I be using a state machine, like Mechanim, for standard 3rd Person input based Actions like idling, walking, running, jumping, rotating? Or maybe component based actions?
I've been studying how to create 3rd person controls for a while now. Most of the tutorials Ive seen have used a single class to handle input based player actions like running, jump, turning, etc ...
Now that my project is getting complicated with things like climbing and wall jumping the "if,then" statements are getting very complicated and hard to debug.
I was wondering if other people are using the state machine or other state management systems for dealing with things other than "AI behaviors"
I theoretically like pluggable state system because it can allow for player A to have the double jump ability and player B to have a wall climb ability - and implement this simply by dragging modular actions on to the players.
Some tutorials even suggest that a state machine is incorrect for unity and to use components to achieve this effect.
Does anyone have any thoughts, opinions or feedback?
Thank you,
Your answer
![](https://koobas.hobune.stream/wayback/20220612153814im_/https://answers.unity.com/themes/thub/images/avi.jpg)