Character Controller which suddenly has stopped working (Move() does not seem to do anything)

See code attached for reference or if there’s anything that has stopped it to behave

public class CharacterMovement3D : MonoBehaviour
{
    public float movementSpeed = 6f;
    public float gravity = -9.81f;
    public float jumpForce = 2f;
    public float jumpSpeed = -3;

    Controls playerInput;
    CharacterController _charController;
    Animator characterAnimator;

    Vector2 moveInput;
    Vector3 direction;
    Vector2 playerVelocity;
    bool jumpPressed;
    bool groundedPlayer;

    protected Joystick joystick;
    protected Joybutton joybutton;
    private void Awake()
    {
        _charController = GetComponent<CharacterController>();
        characterAnimator = GetComponent<Animator>();
        playerInput = new Controls();
        playerInput.PlayerMovement.Move.performed += ctx => moveInput = ctx.ReadValue<Vector2>();
        playerInput.PlayerMovement.Jump.started += ctx => jumpPressed = true;
        playerInput.PlayerMovement.Jump.canceled += ctx => jumpPressed = false;
    }
    // Start is called before the first frame update
    void Start()
    {
        joystick = FindObjectOfType<Joystick>();
        joybutton = FindObjectOfType<Joybutton>();
    }

    // Update is called once per frame
    void Update()
    {
        groundedPlayer = _charController.isGrounded;

        moveInput.x = moveInput.x + joystick.Horizontal;

        direction = new Vector3(moveInput.x, 0, 0).normalized;
        
        if (groundedPlayer && playerVelocity.y < 0)
        {
            playerVelocity.y = 0;
        }
        Vector3 movement = (direction * movementSpeed) * Time.deltaTime;
        _charController.Move(movement);

        if (direction != Vector3.zero)
        {
            gameObject.transform.right = direction;
        }

        if(groundedPlayer && jumpPressed || groundedPlayer && joybutton.Pressed)
        {
            Debug.Log("character should jump");
            playerVelocity.y += Mathf.Sqrt(jumpForce * jumpSpeed * gravity);
        }

        playerVelocity.y += gravity * Time.deltaTime;

        _charController.Move(playerVelocity * Time.deltaTime);

        characterAnimator.SetFloat("Speed", Mathf.Abs(moveInput.x));
        
    }

    private void OnEnable()
    {
        playerInput.Enable();
    }

    private void OnDisable()
    {
        playerInput.Disable();
    }
}

I can’t quite explain what happened, it was working one minute and the next the character was neither moving left or right, and it wasn’t being brought down by gravity.
I’ve commented out almost every line and Debug.Logged as much as I can see where I can get a result but I can’t quite track down where the issue is coming from. I’ve looked around a bit on Unity Answers/general searching around but can’t seem to find anyone else with a conclusive solution for Character Controllers suddenly “not working”. Any one had experience with this?

Hi @bstyle,
I had exactly the same issue and managed to fix my issue by changing the “Min Move Distance” parameter to “0” in the Character Controller component. Hope that helps you, or whoever stumbles upon this thread in the future.