delta
The relative movement of the mouse compared to last event.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.IMGUIModule
public Vector2 delta { get; set; }
Remarks
Additional Resources: Event.mousePosition.
Examples
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); } }}