I know there are many posts/questions on touch drag, but everything I found normally involved a camera angle that was a multiple of 90 degrees.
I have a game for mobile devices that has a 60 degree camera angle, and we want users to be able to drag objects. The only issue is that dragging up and down on the screen affects both the Y and Z position of the gameObject to where its slightly off the finger, but follows it for the most part. I also don’t want to move the Y position of the gameObject

my basic function is:

while(touched)
{
   thisTransform.position = mainCamera.ScreenToWorldPoint(Vector3(Input.GetTouch(0).position.x, Input.GetTouch(0).position.y, (thisTransform.position-mainCamera.transform.position).magnitude));
   thisTransform.position.y = 0;
}

I’ve also tried using an offset version:

var offset : Vector3 = thisTransform.position - mainCamera.ScreenToWorldPoint(Vector3(Input.GetTouch(0).position.x, Input.GetTouch(0).position.y, (thisTransform.position-mainCamera.transform.position).magnitude));
while(touched)
{
   thisTransform.position = mainCamera.ScreenToWorldPoint(Vector3(Input.GetTouch(0).position.x, Input.GetTouch(0).position.y, (thisTransform.position-mainCamera.transform.position).magnitude)) + offset;
   thisTransform.position.y = 0;
}

The first code block works perfectly fine when using say a 90 degree camera, but that 60 degree angle throws it slightly off (and no I can’t change the camera angle). Any suggestions?

One idea. Construct a plane parallel to your surface. You can use a real plane or you can use a mathematical plane using Unity’s Plane class. When a use begins to drag the object, offset the plane upward by 1/2 of the height of the object (i.e. if it were a cube 1 unit in size, the planes would be moved upward 1/2 unit. To place the object, do a raycast against the plane and use the hit point. For a real plane, you can use Physics.Raycast(). For a mathematical plane, you can use Plane.Raycast(). Position the object at the hit point. That point should also be where position.y = 0;