# Input delay when using CharacterController.Move function

**URL:** https://discussions.unity.com/t/input-delay-when-using-charactercontroller-move-function/751383
**Category:** Getting Started
**Created:** [July 21, 2019, 3:33pm UTC](https://discussions.unity.com/t/input-delay-when-using-charactercontroller-move-function/751383 "2019-07-21T15:33:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![PanLewiatan](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@PanLewiatan](https://discussions.unity.com/u/PanLewiatan)
#### Post date: [July 21, 2019, 3:33pm UTC](https://discussions.unity.com/t/input-delay-when-using-charactercontroller-move-function/751383/1 "2019-07-21T15:33:08Z")

</div>

Hello,  
I’ve noticed that when I use CharacterController.Move my character never stops immediately after I stop pressing W - it always takes him a few moments (usually around 1 second) to stop.  
It looks like there’s some kind of input delay, although game recognizes that none of the relevant buttons are pressed when this problem occurs.  
What really baffles me is that this seems to happen only if I normalize my velocity vector so that moving forward and sideways at the same time doesn’t make you move faster (check code below for reference).

Anyone knows what might be the reason why it happens? And what would be a proper way of implementing movement without such delay?

Here’s my code:

```csharp
    void Update ()
    {
        yaw += lookSensitivity * Input.GetAxis("Mouse X");
        pitch -= lookSensitivity * Input.GetAxis("Mouse Y");
        pitch = Mathf.Clamp(pitch, -90, 90);

        transform.eulerAngles = new Vector3(pitch, yaw, 0.0f);

        Vector3 vel = transform.forward * Input.GetAxis("Vertical");
        vel += transform.right * Input.GetAxis("Horizontal");
        vel.Normalize(); // after I comment this line out problem disappears, but then you move faster if you walk forward and sideways at the same time
        vel *= speed;

        if (controller.isGrounded)
        {
            vSpeed = 0;
            if (Input.GetKeyDown("space"))
            {
                vSpeed = jumpSpeed;
            }
        }

        vSpeed -= gravity * Time.deltaTime;
        vel.y = vSpeed;
        controller.Move(vel * Time.deltaTime);
        Debug.Log(controller.velocity);
    }

```

---

<div class="post-metadata">

### Author: ![PanLewiatan](https://avatars.discourse-cdn.com/v4/letter/p/e19b73/32.png) [@PanLewiatan](https://discussions.unity.com/u/PanLewiatan)
#### Post date: [July 22, 2019, 5:39am UTC](https://discussions.unity.com/t/input-delay-when-using-charactercontroller-move-function/751383/2 "2019-07-22T05:39:59Z")

</div>

Ok, I understand the problem now - I’ve wrongly assumed that GetAxis will always return either 0, 1 or -1. It turns out that even when playing on keyboard it can return values in between these.  
This means that I should normalize vector only if it’s magnitude is bigger than 1 - otherwise it will sometimes make it bigger then it should be. After adding a condition before normalizing vector everything works like it should.

---

<div class="post-metadata">

### Author: ![matheuscberbel](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@matheuscberbel](https://discussions.unity.com/u/matheuscberbel)
#### Post date: [March 22, 2024, 8:59pm UTC](https://discussions.unity.com/t/input-delay-when-using-charactercontroller-move-function/751383/3 "2024-03-22T20:59:10Z")

</div>

thanks bro, you fixed my problem

---

<div class="post-metadata">

### Author: ![ausias03](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@ausias03](https://discussions.unity.com/u/ausias03)
#### Post date: [December 11, 2025, 5:01pm UTC](https://discussions.unity.com/t/input-delay-when-using-charactercontroller-move-function/751383/4 "2025-12-11T17:01:25Z")

</div>

Use Input.GetAxisRaw instead of Input.GetAxis

Your welcome
