# InputSystem reporting wrong mouse position after WarpCursorPosition

**URL:** https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589
**Category:** Input
**Tags:** Input, Bug
**Created:** [July 10, 2020, 1:20pm UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589 "2020-07-10T13:20:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Garrafote](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/garrafote/32/579559_2.png) [@Garrafote](https://discussions.unity.com/u/Garrafote)
#### Post date: [July 10, 2020, 1:20pm UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/1 "2020-07-10T13:20:25Z")

</div>

I noticed that when calling Mouse.current.WarpCursorPosition() the cursor will move to the right position but InputSystem will report the old position until the next mouse event.

This is happening on:  
Input System 1.0.0  
Unity 2020.1.0b14  
Windows 10

---

<div class="post-metadata">

### Author: ![Garrafote](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/garrafote/32/579559_2.png) [@Garrafote](https://discussions.unity.com/u/Garrafote)
#### Post date: [July 10, 2020, 1:38pm UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/2 "2020-07-10T13:38:57Z")

</div>

If someone else anyone finds this bug, I managed to work around this by manually queuing a state event:

```csharp
Mouse.current.WarpCursorPosition(focus);
InputSystem.QueueDeltaStateEvent(Mouse.current["position"], focus);

```

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/system/32/97283_2.png) [@system](https://discussions.unity.com/u/system)
#### Post date: [July 13, 2020, 5:50pm UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/3 "2020-07-13T17:50:17Z")

</div>

> [@Garrafote](#):
>
> If someone else anyone finds this bug

This is not a bug. It is a [documented behavior](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/api/UnityEngine.InputSystem.Mouse.html?q=warp#UnityEngine_InputSystem_Mouse_WarpCursorPosition_Vector2_).

---

<div class="post-metadata">

### Author: ![Garrafote](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/garrafote/32/579559_2.png) [@Garrafote](https://discussions.unity.com/u/Garrafote)
#### Post date: [July 14, 2020, 11:38am UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/4 "2020-07-14T11:38:26Z")

</div>

@

Thanks for pointing that out, but I’m aware of the documentation and it still fells like a bug.

See, the documentation states that “the [position](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/api/UnityEngine.InputSystem.Pointer.html#UnityEngine_InputSystem_Pointer_position) property will not update immediately but rather **will update in the next input update** ”. This means that the position should be updated on the next frame’s Update, or isn’t that right?

Well that is not what I’m getting.  
As I said, the position property is only updating **after another mouse input event** , In other words, the mouse pointer will - by default - only be warped to the target position after the mouse is physically moved or clicked.

---

<div class="post-metadata">

### Author: ![system](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/system/32/97283_2.png) [@system](https://discussions.unity.com/u/system)
#### Post date: [July 14, 2020, 4:20pm UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/5 "2020-07-14T16:20:03Z")

</div>

> [@Garrafote](#):
>
> isn’t that right

You just highlighted it bold. When the input next updates. Update method and input update aren’t the same thing, the input doesn’t even need to update in the Update method.

But if you still feel it’s a bug, why don’t you report it instead of the forum? But again, it is documented behavior so…

---

<div class="post-metadata">

### Author: ![Zelgadis87](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@Zelgadis87](https://discussions.unity.com/u/Zelgadis87)
#### Post date: [June 14, 2021, 12:47pm UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/6 "2021-06-14T12:47:51Z")

</div>

This was driving me crazy too. I read the documentation and thought in the next frame update it would read the correct position, I didn’t understand it would _only_ update on the next input event. Thanks @Garrafote for the heads up!

---

<div class="post-metadata">

### Author: ![dmytro\_at\_unity](https://dub1.discourse-cdn.com/unity/user_avatar/discussions.unity.com/dmytro_at_unity/32/610109_2.png) [@dmytro\_at\_unity](https://discussions.unity.com/u/dmytro_at_unity)
#### Post date: [June 15, 2021, 11:36am UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/7 "2021-06-15T11:36:50Z")

</div>

Position should be updating next frame / next update, I’ve checked and what we’re doing at warp is calling SetCursorPos / CGWarpMouseCursorPosition / SDL\_WarpMouseInWindow / etc, and code relies on OS to report the new position as-it-would-be for normal user mouse movements, but maybe that is not happening at all.

Could you please report it as a bug (Help-\>Report bug) and we will take it from there. Thanks a lot!

---

<div class="post-metadata">

### Author: ![DoN2kcz](https://avatars.discourse-cdn.com/v4/letter/d/c4cdca/32.png) [@DoN2kcz](https://discussions.unity.com/u/DoN2kcz)
#### Post date: [November 15, 2023, 10:14am UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/8 "2023-11-15T10:14:36Z")

</div>

This is still happening (at least in Editor). After you call Warp, it will not update the mouse position ever until you click (maybe just move) the mouse physically yourself.

@Garrafote 's fix is still working fine though. Thanks!

---

<div class="post-metadata">

### Author: ![Onigiri](https://avatars.discourse-cdn.com/v4/letter/o/fbc32d/32.png) [@Onigiri](https://discussions.unity.com/u/Onigiri)
#### Post date: [June 4, 2025, 1:36am UTC](https://discussions.unity.com/t/inputsystem-reporting-wrong-mouse-position-after-warpcursorposition/799589/9 "2025-06-04T01:36:10Z")

</div>

Still an issue on 6.2 beta and @Garrafote’s fix is not working for me

Edit: I’ve found that fix isn’t working only in ForceSoftware mode
