So i wanted to make a first person game so i thought lets start with movement. i looked up a tutorial on how to do it and i have done every thing in the vid but it says that the second time i use md that it is an unexpected symbol but in the tutorial there is no problem. (
the vid i am reverting to) if someone could pls help me i would really appreciate that. (i am talking about the md that looks like this: “md”.)
using UnityEngine;
using System.Collections;
public class camMouseLook : MonoBehaviour {
Vector2 mouseLook;
Vector2 smoothV;
public float sensitivity = 5.0f;
public float smoothing = 2.0f;
GameObject character;
void Start ()
{
character = this.transform.parent.gameObject;
}
void Update ()
{
var md = new Vector2(Input.GetAxisRaw(“Mouse X”), Input.GetAxisRaw(“Mouse Y”))
md = Vector2.Scale(md, new Vector2(sensitivity * smoothing, sensitivity * smoothing));
smoothV.x = Mathf.Lerp(smoothV.x, md.x, 1f / smoothing);
smoothV.y = Mathf.Lerp(smoothV.y, md.y, 1f / smoothing);
mouseLook += smoothV;
transform.localRotation = Quaternion.AngleAxis(-mouseLook.y, Vector3.right);
character.transform.localRotation = Quaternion.AngleAxis(mouseLook.x, character.transform.up);
}
}