Camera movement as Horizontal and Vertical inputs
I would like to use the camera movements as the "Horizontal" and "Vertical" inputs in Unity. This is what i wrote so far but no success, any help would be great!
using UnityEngine;
using System.Collections;
public class CamMoving : MonoBehaviour {
void Update ()
{
float moveHorizontal = Input.GetAxis ("Horizontal");
float moveVertical = Input.GetAxis ("Vertical");
Camera.main.ScreenToWorldPoint(new Vector3 (moveHorizontal, moveVertical, 0));
}
}
