---
tags:
    - "Cursor"
    - "Move"
    - "Pan"
    - "Look"
    - "Horizontal"
---

# Mouse Delta X

[Input](index.md) / **Mouse Delta X**

<div class="grid cards" markdown>

* :green_circle: Can Read

* :red_circle: Cannot Write

</div>

## Description

Returns the horizontal delta movement of the Mouse

## Code

```cs
using System;
using UnityEngine.InputSystem;
using VisualScript.Icons;

namespace VisualScript.Runtime
{
    [Get]

    [Title("Mouse Delta X")]
    [Category("Input/Mouse Delta X")]

    [Description("Returns the horizontal delta movement of the Mouse")]
    [Image(typeof(IconMove), ColorTheme.Type.Blue, typeof(BadgeX))]

    [Keywords("Cursor", "Move", "Pan", "Look", "Horizontal")]

    [Serializable]
    public class TypeNumberInputMouseDeltaX : TypeNumber
    {
        public override double Get(Args args)
        {
            Mouse mouse = Mouse.current;
            return mouse != null ? mouse.delta.ReadValue().x : 0d;
        }

        public override string ToString()
        {
            return "Mouse Delta X";
        }

        protected override SubscriptionMode Subscription => SubscriptionMode.OnChange;
    }
}

```

