✅ 4 compiler errors..I need someone to help me fix this
for anyone that is willing to help, here is the code:
using system.Collections;
using system.Collections.Generic;
using UnityEngine;
public class PlayerCam : Monobehaviour
{
public class float sensX;
public class float sensY;
public Transform orientation;
float xRotation;
float yRotation;
private void Start()
{
Cursor.lockstate = CursorLockMode.Locked;
Cursor.visible = false;
}
private void Update()
{
// get mouse input
float mouseX = Input.GetAxisRaw("Mouse X") * Time.deltaTime * sensX;
float mouseY = Input.GetAxisRaw("Mouse Y") * Time.deltaTime * sensY;
yRotation += mouseX;
xRotation -= mouseY;
}
}
you can check the compiler errors in the picture
using system.Collections;
using system.Collections.Generic;
using UnityEngine;
public class PlayerCam : Monobehaviour
{
public class float sensX;
public class float sensY;
public Transform orientation;
float xRotation;
float yRotation;
private void Start()
{
Cursor.lockstate = CursorLockMode.Locked;
Cursor.visible = false;
}
private void Update()
{
// get mouse input
float mouseX = Input.GetAxisRaw("Mouse X") * Time.deltaTime * sensX;
float mouseY = Input.GetAxisRaw("Mouse Y") * Time.deltaTime * sensY;
yRotation += mouseX;
xRotation -= mouseY;
}
}
you can check the compiler errors in the picture


