Reworked camera handling to be smoother

This commit is contained in:
finnchen123
2026-01-24 14:15:31 +01:00
parent f74ec7e84d
commit 467f6a78e2
5 changed files with 87 additions and 73 deletions

View File

@@ -43,17 +43,9 @@ namespace Assets.Scripts.Player
return null;
}
public void LookAround(Vector2 view, Vector2 speed)
public void LookAround(float pitch)
{
if (transform.rotation.x <= -0.25)
{
if (view.y > 0) return;
}
if (transform.rotation.x >= 0.25)
{
if (view.y < 0) return;
}
transform.Rotate(Vector3.left, view.y * speed.y);
transform.localRotation = Quaternion.Euler(pitch, 0f, 0f);
}
void showInformation()