публичный класс KameraKontrol: MonoBehaviour
{
Код: Выделить всё
public Transform hedef;
public Vector3 hedefMesafe;
[SerializeField]
private float hassasiyet;
float fareX, fareY;
Vector3 objRot;
public Transform karakterVucut;
void Start()
{
Cursor.lockState = CursorLockMode.Locked;
}
void Update()
{
}
private void LateUpdate()
{
this.transform.position = Vector3.Lerp(this.transform.position, hedef.position + hedefMesafe, Time.deltaTime * 10);
fareX += Input.GetAxis("Mouse X") * hassasiyet;
fareY += Input.GetAxis("Mouse Y") * hassasiyet;
if (fareY >= 25)
{
fareY = 25;
}
if (fareY
Подробнее здесь: [url]https://stackoverflow.com/questions/78812335/i-am-stuck-with-unity-c-sharp-cameracontrol-script[/url]