# delta

> The relative movement of the mouse compared to last event.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.IMGUIModule

```csharp
public Vector2 delta { get; set; }
```

### Remarks

Used in [EventType.MouseMove](/engine/6000.0/script-reference/unityengine/eventtype/mousemove.md), [EventType.MouseDrag](/engine/6000.0/script-reference/unityengine/eventtype/mousedrag.md), [EventType.ScrollWheel](/engine/6000.0/script-reference/unityengine/eventtype/scrollwheel.md) events.

Additional Resources: [Event.mousePosition](/engine/6000.0/script-reference/unityengine/event/mouseposition.md).

### Examples

```csharp
using UnityEngine;

public class Example : MonoBehaviour
{
    // Move the scroll wheel to determine
    // the X & Y scrolling amount.
    void OnGUI()
    {
        Event e = Event.current;
        if (e.isMouse)
        {
            Debug.Log(e.delta);
        }
    }
}
```
