I cant figure out what i did wrong. Anyone have a clue to help out?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CamraController : MonoBehaviour
{
[SerializeField] private float mouseSensitivity;
private Transform parent;
private void Start()
{
parent = transform.parent;
}
private void Update()
{
Rotate();
}
private void Rotate()
{
float mouseX = Input.GetAxis("Mouse X") * mouseSensitivity * Time.deltaTime;
parent.Rotate(Vector3.up mouseX);
}
}