Hi guys, I hope you all are doing great. I'm bringing this subject to get some feedback regarding the organization of a hierarchical state machine. I've been looking at some references and I found this very interesting "nested (or hierarchical) state machine" diagram ↓↓↓ Diagram by youtuber "Bardent" So, as you can see, the yellow boxes are the superstates, while the blue and green boxes are the "regular" or sub-states. The arrows represent the transitions and their white boxes represent the conditions for such transitions. I know it can be a little chaotic at first glance, but after reviewing it carefully, I think it's very well organized (Let me know if you think otherwise, or if you think of any improvements for it). Now the issue I want to discuss here is the following: All the movement is being read and applied in the "Grounded Superstate", specifically in the "move sub-state". That means that, outside this superstate, there's no going to be movement: therefore, it implies that the jump might be keeping the momentum but you won't be able to control the character as to change directions; same with the attack: you won't be able to move while attacking or to change directions in mid-combo. Of course, you can implement some movement in these particular sub-states if you wanted to, but I'm thinking in terms of reusability. So, a question I want to throw out: - If I wanted to have movement control while attacking and jumping, would it be possible (I guess so) or recommended to upgrade the attack and jump sub-states to a superstate? So that, for example, when I transition from the Grounded Superstate to the (new) Jump Superstate I would have a "move sub-state" inside that allows my input to be read, and the player will be able to move in mid-air.