---
title: "movePointerTo"
description: "Updates the position of the pointer with the given [pointerId] to the given [position], but does
not send a move event. The move event can be sent with [move]. The [position] is in the node's
local coordinate system, where (0.px, 0.px) is the top left corner of the node.

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.movePointerTo(pointerId: Int, position: Offset) =
    delegateScope.touch { updatePointerTo(pointerId, position) }
```


Updates the position of the pointer with the given `pointerId` to the given `position`, but does
not send a move event. The move event can be sent with `move`. The `position` is in the node's
local coordinate system, where (0.px, 0.px) is the top left corner of the node.

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` |
| position | The new position of the pointer, in the node's local coordinate system |




