deltaPosition
The position delta since last change in pixel coordinates.
Read time 1 minuteLast updated 8 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.InputLegacyModule
public Vector2 deltaPosition { get; set; }
Remarks
The absolute position of the touch is recorded periodically and available in the _position property. The deltaPosition value is a Vector2 in pixel coordinates that represents the difference between the touch position recorded on the most recent update and that recorded on the previous update. The _deltaTime value gives the time that elapsed between the previous and current updates; you can calculate the touch's speed of motion by dividing deltaPosition.magnitude by _deltaTime.
Additional Resources: _deltaTime