---
title: "movePointerBy"
description: "Moves the position of the pointer with the given [pointerId] by the given [delta], but does not
send a move event. The move event can be sent with [move].

If the pointer is not yet down, an [IllegalArgumentException] will be thrown."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


> **Deprecated** Replaced by TouchInjectionScope. Use `performTouchInput` instead of `performGesture`

```kotlin
fun GestureScope.movePointerBy(pointerId: Int, delta: Offset) =
    delegateScope.touch { updatePointerBy(pointerId, delta) }
```


Moves the position of the pointer with the given `pointerId` by the given `delta`, but does not
send a move event. The move event can be sent with `move`.

If the pointer is not yet down, an `IllegalArgumentException` will be thrown.

#### Parameters

| | |
| --- | --- |
| pointerId | The id of the pointer to move, as supplied in `down` |
| delta | The position for this move event, relative to the last sent position of the pointer. For example, `delta = Offset(10.px, -10.px) will add 10.px to the pointer's last x-position, and subtract 10.px from the pointer's last y-position. |




