# On Swipe

## Overview

![The On Swipe Node.](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-57c57672fc7d7a5bfc0087f32278e63903bd1b21%2Fonswipenode20241.png?alt=media)

**On Swipe** is an **Event Listener** **Node** used for executing a **Logic Branch** after a swipe on an **Object**.

[**Scope**](https://docs.incari.com/incari-studio/2024.1/overview#scopes): **Scene**, **Prefab**.

## Attributes

![The On Swipe Node Attributes.](https://4263346935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLnh3x8s9fddWeG8TaAug%2Fuploads%2Fgit-blob-89340d2e48951624b2ad43ac48d984ab31055bdb%2Fonswipeattributes.png?alt=media)

### Object

| Attribute | Type         | Description                                                                                              |
| --------- | ------------ | -------------------------------------------------------------------------------------------------------- |
| `Object`  | **ObjectID** | The **Object** in which a swipe triggers the **Logic Branch**, if none is given in the **Input Socket**. |

### Button

| Attribute      | Type          | Description                                                                                     |
| -------------- | ------------- | ----------------------------------------------------------------------------------------------- |
| `Mouse Button` | **Drop-down** | Whether a swipe with the left, middle, or right button of the mouse will trigger the **Logic**. |

### Swipe

| Attribute         | Type          | Description                                                |
| ----------------- | ------------- | ---------------------------------------------------------- |
| `Swipe Direction` | **Drop-down** | The direction in which a swipe will trigger the **Logic**. |

## Inputs

| Input           | Type         | Description                                                                        |
| --------------- | ------------ | ---------------------------------------------------------------------------------- |
| `Object ID`     | **ObjectID** | The **Object** in which a swipe triggers the **Logic Branch**.                     |
| `Subscribe` (►) | **Pulse**    | An **Input Pulse** that needs to be triggered to start listening to the **Event**. |

## Outputs

| Output             | Type         | Description                                                                                                                                                                                      |
| ------------------ | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| *Pulse Output* (►) | **Pulse**    | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution.                                                           |
| `Distance`         | **Vector2**  | Length of the swipe in the X and Y directions.                                                                                                                                                   |
| `Object ID`        | **ObjectID** | The **Object** received as **Input**.                                                                                                                                                            |
| `Event ID`         | **ObjectID** | The ID of the current **Event**. This can be connected to the [**Unsubscribe Node**](https://docs.incari.com/incari-studio/2024.1/toolbox/events/unsubscribe) to unsubscribe from the **Event**. |

## See Also

* [**Gestures**](https://docs.incari.com/incari-studio/2024.1/toolbox/events/gestures)
