- Home /
My 3D movement controller crouch not working properly
So I have a basic 3D Movement controller and it can crouch, sprint and jump. However, when crouching i change the player height to half its height which works but it causes this crouching to happen very slowly rather than snapping in an instant like it does when you let go of the crouch key and stand up. Can anyone help me make the crouch happen instantly, sorry if this is a dumb question I am very new to unity.
Answer by MUG806 · Feb 22, 2021 at 02:38 PM
I think you are correctly changing the height instantly, but I'm guessing that when the height of the capsule changes, it shrinks towards the center of the collider, so when the character crouches, they actually shrink away from the floor, taking their "feet" off the ground. Then your character falls with gravity, which looks like the crouch slowly happening.
The solution would be to also move the character down when they crouch by the same distance.
Your answer
![](https://koobas.hobune.stream/wayback/20220613025516im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Character moves slightly while crouching? 0 Answers
How can i stop my Third person character from crouching from a weapon i placed in his hand? 0 Answers
Crouch Script with transform.localScale 0 Answers
CharacterController vs Rigidbody (photo included) 2 Answers
Which character control method to use to constrain the movement to a circular path? 0 Answers