유니티 C# 카메라 이동범위 제한 Camera Mathf.Clamp


유니티 C# 카메라 이동범위 제한 Camera Mathf.Clamp

코드 작성 using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraController : MonoBehaviour { public float offsetX = 10; public float offsetY = 10; public float offsetZ = 10; void LateUpdate() { transform.position = new Vector3( Mathf.Clamp(Camera.main.transform.position.x, -offsetX, offsetX), Mathf.Clamp(Camera.main.transform.position.y, -offsetY, offsetY)..


원문링크 : 유니티 C# 카메라 이동범위 제한 Camera Mathf.Clamp