Stopping CharacterController instantly?

I know this question has been answered several times, but none of the solutions seem to work for me.

I have a boolean deciding whether not the player can move, and even when that’s disabled the player still moves in the direction they were last going–even if they aren’t pressing any keys.

Is there any way to stop a character controller? Thanks.

1 Like

Nevermind everyone, I had to check for another bool I had. The bool is used for any character action, when it’s false the character can’t move, shoot chat, etc. Opposite for true.

All I had to do is check if it was true, if not then do this:

cc.Move(new Vector3(0, 0, 0));

Sounds like physics is involved some how - or if this happens after a button is released there is an input that is still active.

Have you confirmed physics is not involved
OR after a button is released it is turning to false?