You are setting "mTrans.localPosition = Input.mousePosition;" -- This is wrong. Input.mousePosition is in screen coordinates. Transform's localPosition is in local coordinates -- relative to the parent. You need to convert screen to world, then convert world to local using standard math functions (camera.ScreenToWorldPoint, transform.parent.InverseTransformPoint)