AndrzejGieralt
New member
Hello! What is the correct way to make use of the states in the character controller? There are so many options it is quite a lot to take in!
What I'd like to do is have the player not be able to run while crouched, slow down while crouched, and be able to run/sprint while standing. I tried 2 things.
1) I tried to add a new Speed Change ability that had the same start/stop as crouch, and a speed multiplier of 0.4 or 0.6 (tried a few speeds) - this worked great, except when I jumped, I was now no longer able to change the height when crouching. After a jump, regardless of if I jumped from crouch or from run, I would no longer change height after crouching (but, prior to jumping, I could change height). Before jumping, if I crouched, I could see that Height Change and my second Speed Change were both active when pressing the crouch key, but after jumping, when I crouched, only the second speed change was active, and the height change would no longer activate.
2) I also tried doing 2 different presets in the Speed Change ability instead. I created a preset for Run and added the speed mult and start stop that run had, and another preset for crouch using a speed mult of 0.4 and the same start/stop as crouch. When doing this, it behaved unpredictably. While running, if I released shift, I would not stop running until I stopped moving. If I crouched, my speed stayed the same until I hit shift, which seemed to slow me properly but as a toggle, that would also stop slowing me if I stopped and started moving again. Do I have to do something to the defaults of the Speed Change ability?
Tangentially, I get the utility of having all these abstractions but I love being able to just overwrite everything by throwing scripts on top of things. Like just have a script that will set the movement speed regardless of the state or something... handle my own sneak/crouch related logic in a separate script and do everything there... and just not worry about the underlying systems - one might think, well that just defeats the point of using an asset, just write it yourself - but, I appreciate the core functionality, I appreciate the rewired integration and not having to worry about the physics and all the intricacies of making a controller feel good - but would still like to be able to just inject whatever I want over top without having to learn the entire domain of the asset. Maybe that's just what you get when using an extensive and highly generic system like this.
What I'd like to do is have the player not be able to run while crouched, slow down while crouched, and be able to run/sprint while standing. I tried 2 things.
1) I tried to add a new Speed Change ability that had the same start/stop as crouch, and a speed multiplier of 0.4 or 0.6 (tried a few speeds) - this worked great, except when I jumped, I was now no longer able to change the height when crouching. After a jump, regardless of if I jumped from crouch or from run, I would no longer change height after crouching (but, prior to jumping, I could change height). Before jumping, if I crouched, I could see that Height Change and my second Speed Change were both active when pressing the crouch key, but after jumping, when I crouched, only the second speed change was active, and the height change would no longer activate.
2) I also tried doing 2 different presets in the Speed Change ability instead. I created a preset for Run and added the speed mult and start stop that run had, and another preset for crouch using a speed mult of 0.4 and the same start/stop as crouch. When doing this, it behaved unpredictably. While running, if I released shift, I would not stop running until I stopped moving. If I crouched, my speed stayed the same until I hit shift, which seemed to slow me properly but as a toggle, that would also stop slowing me if I stopped and started moving again. Do I have to do something to the defaults of the Speed Change ability?
Tangentially, I get the utility of having all these abstractions but I love being able to just overwrite everything by throwing scripts on top of things. Like just have a script that will set the movement speed regardless of the state or something... handle my own sneak/crouch related logic in a separate script and do everything there... and just not worry about the underlying systems - one might think, well that just defeats the point of using an asset, just write it yourself - but, I appreciate the core functionality, I appreciate the rewired integration and not having to worry about the physics and all the intricacies of making a controller feel good - but would still like to be able to just inject whatever I want over top without having to learn the entire domain of the asset. Maybe that's just what you get when using an extensive and highly generic system like this.