I’m working on a 3rd-person action-adventure game, and I’m having trouble getting my different movement speeds working correctly together. I have jogging, walking, sprinting, crouching and prone; and essentially, I want sprinting to override all other movement speeds when it’s activated. I also have an aiming state as well, which sprinting will need to override too. I’ve been working with booleans, but there are enough possible combinations of states that the boolean logic just becomes a big mess.
What other method(s) could I use to make the state management cleaner and easier to handle? Enums and switches? I don’t really know at this point.