Description
The CursorMoveDelta
property provides the change in cursor position between the current frame and the previous frame, measured in screen space. This property is useful for detecting and responding to cursor movement in applications that require precise input handling, such as in-game editors or custom UI components.
Usage
To use the CursorMoveDelta
property, simply access it as a static property of the Gizmo
class. This property returns a Vector2
representing the horizontal and vertical movement of the cursor.
Example
// Example of using CursorMoveDelta to track cursor movement
Vector2 cursorDelta = Gizmo.CursorMoveDelta;
// Use the cursorDelta to perform actions based on cursor movement
if (cursorDelta.Length > 0)
{
// Perform an action, such as moving an object or updating a UI element
MoveObject(cursorDelta);
}