My camera movement is not working help!!

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);
}
}

You missed a semi colon at the end of the previous line. :slight_smile:

Please take a moment to look at this thread for how to post code properly on the forums: Using code tags properly - Unity Engine - Unity Discussions

Welcome to Unity.

Feel free to check out some material in the Learn section of the website, as well: Learn

OMG I am an idiot thank you.

No worries, you’re welcome :slight_smile: