void PickedObjectFollow(Ray ray) { if (PickedObject == null) { return; } Vector2 targetPos = ray.origin; PickedObject.transform.position = targetPos - pickedDeltaValue; SpriteObject sObject = PickedObject.GetComponent <SpriteObject>(); deltaPosition = PickedObject.transform.position - lastPosition; lastPosition = PickedObject.transform.position; if (sObject != null) { sObject.OnPickingObject(deltaPosition.magnitude); } }