목록C# 기초 (2)
WJ의 개인블로그
Unity. 2DCamera follow 기초2
2DCamera follow 기초2(영역 지정) public Transform player; Vector3 velocity = Vector3.zero; public float smoothTime = 0.15f; public bool XMaxEnabled = false; public float XMaxValue = 0; public bool XMinEnabled = false; public float XMinValue = 0; public bool YMaxEnabled = false; public float YMaxValue = 0; public bool YMinEnabled = false; public float YMinValue = 0; void FixedUpdate() { Vector3 playerP..
Unity/Unity 기초
2019. 1. 22. 15:09
Unity. 2D기초 Camera follow
2D Camera follow 기초 GameObject player; void Start() { player = GameObject.Find("Player"); } void Update() { Vector3 playerPos = player.transform.position; transform.position = new Vector3(playerPos.x, playerPos.y + 2, transform.position.z); }
Unity/Unity 기초
2019. 1. 22. 00:47