title: Character controller get stuck
body: <p>I am making a game with Unity. For some reason the character controller gets stuck.</p>
  <p><a href="https://streamable.com/dwmrgm" rel="nofollow noreferrer">Here is a video of that</a></p>
  <p>This is the player controller code:</p>
  <pre><code>private CharacterController CharacterController;
  public float Speed = 12;
  private Vector3 Velocity;
  private GameObject GroundCheck;
  private bool IsGrounded;
  public float CheckDistance = 0.4f;
  public LayerMask GroundMask;
  public float JumpHeight = 3;
  public float Gravity = -9.81f;
  private void Start()
  {
      GroundCheck = GameObject.Find(&quot;GroundCheck&quot;);
      CharacterController = GetComponent&lt;CharacterController&gt;();
  }
  private void Update()
  {
      IsGrounded = Physics.CheckSphere(GroundCheck.transform.position, CheckDistance, GroundMask);
      float X = Input.GetAxis(&quot;Horizontal&quot;);
      float Y = Input.GetAxis(&quot;Jump&quot;);
      float Z = Input.GetAxis(&quot;Vertical&quot;);
      Vector3 Move = transform.right * X + transform.forward * Z;
      CharacterController.Move(Move * Speed * Time.deltaTime);
      if (Y == 1 &amp;&amp; IsGrounded)
      {
          Velocity.y = Mathf.Sqrt(JumpHeight * -2 * Gravity);
      }
      if (IsGrounded &amp;&amp; Velocity.y &lt; 0)
      {
          Velocity.y = -2;
      }
      Velocity.y += Gravity * Time.deltaTime;
      CharacterController.Move(Velocity * Time.deltaTime);
  }
  </code></pre>