This should close out #18, which is a couple of features I wanted to have in the controller.
Crouch toggling behaves nicely in that if you toggle crouching off while the player can't stand, they'll do the automatic standing like what happens currently if you let go of crouch while underneath something. That seemed reasonable.
Run toggling I gave two options for, one that is just a normal toggle on/off and a separate toggle that automatically turns off if the player stops providing movement input. The latter is how I like my sprint toggles, but it is easy enough to have both in there for people to choose from.
I also made both enums for future extensibility, even though crouching only has two modes, that way additional toggle modes could be implemented without breaking serialized versions of the components.
This should close out #18, which is a couple of features I wanted to have in the controller.
Crouch toggling behaves nicely in that if you toggle crouching off while the player can't stand, they'll do the automatic standing like what happens currently if you let go of crouch while underneath something. That seemed reasonable.
Run toggling I gave two options for, one that is just a normal toggle on/off and a separate toggle that automatically turns off if the player stops providing movement input. The latter is how I like my sprint toggles, but it is easy enough to have both in there for people to choose from.
I also made both enums for future extensibility, even though crouching only has two modes, that way additional toggle modes could be implemented without breaking serialized versions of the components.