こんな感じで、Cubeをカーソルを追いかけるように移動させたい時は
こんなScriptを書いてCubeに貼ります。
MouseScript.cs
using UnityEngine;
using System.Collections;
public class MouseScript : MonoBehaviour {
Vector3 screenPoint;
// Update is called once per frame
void Update () {
this.screenPoint = Camera.main.WorldToScreenPoint(transform.position);
Vector3 a = new Vector3 (Input.mousePosition.x,Input.mousePosition.y,screenPoint.z);
transform.position = Camera.main.ScreenToWorldPoint (a);
}
}