move and x and z axis in 3D

I am a novice working on my first, and relatively simple game. I have a basic board with my game objects placed on the board. using DragRigidBody I can move my pieces along the x and z axis (separate question posted on how to lock the axis on movement), however being a 3D game once I place the game into perspective view the movement doesn’t really flow.
I am not sure how to modigy the script to allow for the x and z movement in a perspective view.

Can anyone help?

I think the biggest problem is the DragRigidbody script: it will not give you precise control over the rigidbodies (at least the way I suppose you want). You can freeze movement in the Y axis, what will force the objects to move on the ZX plane only, probably eliminating the 3D problem you’ve mentioned. To freeze vertical movement, check the Y checkbox in the Rigidbody/Constraints/Freeze Position component of the object, in the Inspector.

EDITED: I’ve made a script based on DragRigidbody, but this one drags any object in the XZ plane (rigidbody or not). In order to not drag the board too, it only accepts objects with the tag “block”. The movement is enabled in each axis by the variables xAxis and zAxis - setting one of them to false disable movement in its axis. The objects simply pass through the others - no collisions are detected. Hope this can help you in your game.

var speed: float = 10;
var xAxis: boolean = true;
var zAxis: boolean = true;
private var objPlane: Plane;
private var objTr: Transform;
private var cam: Camera;
private var hit: RaycastHit;

function Start (){

	if (camera)
		cam = camera;
		cam = Camera.main;

function Update (){

	if (Input.GetMouseButtonDown (0)){ // if left button pressed...
		// and some object is under the mouse pointer...
		if (Physics.Raycast(cam.ScreenPointToRay(Input.mousePosition),  hit, 500)){
			// and it has the right tag...
			if (hit.transform.tag == "block"){
				// starts dragging it
				StartCoroutine ("DragObject");

function DragObject(){

	objTr = hit.transform; // save object transform
	// create a plane at object position
	objPlane = Plane(Vector3.up, objTr.position); 
	while (Input.GetMouseButton (0)){ // loop while button pressed
		// create a ray from mouse position perpendicular to screen
		var ray = cam.ScreenPointToRay (Input.mousePosition);
		var distance: float;
		// get the distance from mouse pointer to the plane
		objPlane.Raycast(ray, distance);
		// define the new position 
		var newPos = ray.GetPoint(distance);
		// avoid modification in the disabled axis
		if (!xAxis) newPos.x = objTr.position.x;
		if (!zAxis) newPos.z = objTr.position.z;
		// move to newPos a little step each frame
		objTr.position = Vector3.Lerp(objTr.position, newPos, speed*Time.deltaTime);
		// suspend execution until next frame

Thanks for the reply, I should have been more clear, movement is already locked to xz, precisely as you mentioned. If you are looking at the scene from the top and the grid is aligned to screen xz, no problems. However when you shift into perspective view. (which is the view I want to present my game in) the xz does not translate well. Essentially it continues to follow the screens xz, rather than the scene or worl xz. Not sure if that makes my problem any clearer. I will try tpmpost some images to explain.