using UnityEngine;
public class player : MonoBehaviour
{
public float sensX;
public float sensY;
public transform orientation;
float xrotation;
float yrotation;
private void start()
{
Cursor.lockstate = CursorLockmode.locked;
cursor.visible = false
}
private void update()
{
// get them mousex input
float mouseX = input.GetAxisRaw{"Mouse X"} * Time.deltatime * sensX;
float mouseY = input.GetAxisRaw{"Mouse Y"} * Time.deltatime * sensY;
yrotation += mouseX;
xrotation -= mouseY;
}
}
Use Visual Studio
It visually lists all the errors automagically for you.
using UnityEngine;
public class player : MonoBehaviour
{
public float sensX;
public float sensY;
public Transform orientation;
float xrotation;
float yrotation;
void Start ()
{
Cursor.lockState = CursorLockMode.Locked;
Cursor.visible = false;
}
void Update ()
{
// get them mousex input
float mouseX = Input.GetAxisRaw("Mouse X") * Time.deltaTime * sensX;
float mouseY = Input.GetAxisRaw("Mouse Y") * Time.deltaTime * sensY;
yrotation += mouseX;
xrotation -= mouseY;
}
}
i use visual studio but my does not show nay problem