Error in line 11, if you set the sign “;”, then there will be an error 1030 and 1519
I tried fixes from other forums to no avail. turned to friends. the answer was nothing clear. Please help.
using UnityEngine;
public class CameraPlayer
{
public float sesnityX;
public float sesnityY;
public string Transform; orientation
private float xRotation;
private float yRotation;
void Start()
{
Cursor.lockState =CursorLockMode.Locked;
Cursor.visible = false;
}
void Update()
{
float mouseX = Input.GetAxisRaw("Mouse X") * sesnityX * Time.deltaTime;
float mouseY = Input.GetAxisRaw("Mouse Y") * sesnityY * Time.deltaTime;
yRotation += mouseX;
xRotation -= mouseY;
xRotation = Mathf.Clamp(value:xRotation, min:-90f, max:90f);
// Camera rotation
transform.rotation = Quaternion.Euler(xRotation, yRotation, z:0);
orientation.rotation = Quaternion.Euler(x:0, yRotation, z:0);
}
}
New contributor
user26869505 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1