Hello, I'm trying to reduce the player's walking speed and disable running when entering water, similar to how the Crouch script works, but using a trigger instead of a button. Is there a way to do this? Thanks in advance.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Welcome to the community, @Rantceck.
You can use a pair of Triggers (Enter and Exit) to run Character: Animate and Player: Constrain Actions to adjust the movement speed and prevent/allow running.
Alternatively, you can rely on a custom script, attached to a Collider with "Is Trigger" checked, to handle this:
Thank you, it took me some time to realize my player prefab was broken some how and didn't do anything when I ran "Character: Animate and Player: Constrain", tested both options with a clean prefab and worked perfectly.