using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
float delta_x = Input.GetAxis("Mouse X");
float delta_y = Input.GetAxis("Mouse Y");
transform.position = new Vector3(transform.position.x + delta_x, transform.position.y + delta_y, 0);
}
}
I tryed this code out but I keep getting this error
UnityException: Input Axis Mouse x is not setup.
To change the input settings use: Edit -> Project Settings -> Input
NewBehaviourScript.Update () (at Assets/Player/NewBehaviourScript.cs:13)
Hey go toEdit → Project Settings → Inputand the setting as :: Mouse X Name : Mouse X Gravity : 0 Dead : 0 Sensitivity : 0.1 Type : Mouse Movement Axis : X axis Joy Num : Get Motions from all Joysticks