i have a isue whit the code:
the code is about turning around only the X axis.
but the camera is going up can anyone please help? the code is here to.
using System.Diagnostics;
using UnityEngine;
public class MouseLookAround : MonoBehaviour
{
float rotationX = 0f;
public float sensitivity = 15f;
void Update()
{
rotationX += Input.GetAxis("Mouse X") * sensitivity;
transform.localEulerAngles = new Vector3(rotationX, 0);
}
}