- Home /
Don't want my player to move while crouched
So I don't want the player to be able to translate while he is in the crouch position. I have assigned the LeftControl key to crouch using GetKeyup() and GetKeyDown(). I have tried using "movement.enabled= false;" but I don't know how do l implement it the right way.( movement is an instance of movement script).
Answer by alabdaly · Aug 05, 2019 at 06:27 AM
you can make static int or bool like public static bool iscrouch; and go to movement and if you use rigidbody.MovePosition you can make if(!AnimationScript.iscrouch){
} if that don't help can you describe the problem more ?
Your answer

Follow this Question
Related Questions
Just One of my scene is so laggy 0 Answers
Object reference not set to an instance of an object 1 Answer
The parts of my character disappear when i use the animation 0 Answers
Rendering issue in Unity particle system on UI 0 Answers
What is the diffrence between Reference and GetComponent ? 1 Answer