Hello,
I've been experimenting with a drag n drop system for mobile. It seems that the OnDrag event is not being sent every frame on Android. Has anyone had any luck with this?
My OnDrag code is like so:
void OnDrag (Vector2 delta)
{
if (enabled && UICamera.currentTouchID < 0)
{
Debug.Log ("Dragging! " + this.name);
mTrans.localPosition += (Vector3)delta;
}
}
Testing on the PC, the drag works fine, the object gets dragged around underneath no problem. On mobile, the debug log is not being called and the object does not get dragged around.
Another option is to move this into the Update function (while (dragging){ do drag stuff } ), but I need to retrieve the 'delta' value (or calculate it myself), which kind of defeats the purpose of having the 'OnDrag()' functionality.
Any ideas?
Mike W