Hello everyone I have a problem with this script you will know definitely help considering your experience in the program. What I want to do is move an object along the X axis with the mouse. If I move the mouse to the right in real time also moves the object. The same if I move the mouse to the left. The script works wanted ottimarlo doing so, however, that mouse is coordinated with the object because no part in the central point. I am attaching the script. thanks
var cube: GameObject;
function Start () {
}
function Update () {
******* var = x_coordinate Input.mousePosition.x;
******* cubo.transform.position = Vector3 (x_coordinate, 0.0) * Time.deltaTime;
}