problems with my fps controller

I just need to know what is wrong with this script because for some reason its giving me these errors:

Assets/movement.cs(24,54): error CS0103: The name ‘mouseSensitivity’ does not exist in the current context

UnexpectedEnumValueException`1: Value Unknown of enum Source is unexpected.

unity version: 2020.3.2f1

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class movement : MonoBehaviour
{  

    [SerializeField] Transform playerCamera = null;
  
    void Start()
    {
       
    }

    void Update()
    {
        UpdateMouseLook();
    }

    void UpdateMouseLook()
    {
        Vector2 mouseDelta = new Vector2(Input.GetAxis("Mouse X"), Input.GetAxis("Mouse Y"));

        transform.Rotate(Vector3.up * mouseDelta.x * mouseSensitivity);
    }
}

You never declared a variable called mouseSensitivity so of course you cannot use it on line 24.

1 Like

seems simple, thanks

How to understand compiler and other errors and even fix them yourself:

https://discussions.unity.com/t/824586/8