728x90 ๋ฐ์ํ ๐จ๐ผ๐ป๊ฐ๋ฐ/์ ๋ํฐ3 ์ ๋ํฐ - ์บ๋ฆญํฐ ์์ง์ด๊ธฐ ์ ๋๋ฉ์ด์ ์ฐ์ ์ ๋๋ฉ์ด์ ์ด ์ ์ฉ๋๋ ๋ชจ๋ธ์ ๊ตฌํ๊ณ Animator ํด๋๋ฅผ ํ๋ ๋ง๋ค์ด์ ๊ทธ ์์ Animator Controller๋ฅผ ์์ฑ ํ์ผ ์ด๋ฆ์ MainAnimator ํ์ผ์ ๋๋ฒ ํด๋ฆญํ๋ฉด ํ๋ฉด์ ์ ๋๋ฉ์ด์ ๋ค์ ์ปจํธ๋กคํ ์ ์๋ ์ปจํธ๋กค ์ฐฝ์ ๋จ๊ฒ ํ๋ค. ์ ๊ณณ์๋ค ์ฌ๋ฌ ์ ๋๋ฉ์ด์ ๊ฐ์ฒด๋ค์ ๋์ฌ ๋น๊ฒจ์ ์ฐ๊ฒฐ์ ์์ผ์ฃผ๋ฉด ๋๋ค. ์ ํ ํ์ WAIT01 ์ ๋๋ฉ์ด์ ์ด ์๋ํ๊ฒ ์ฐ๊ฒฐํด์ค ๊ทธ๋ฆฌ๊ณ ๋ค์ ์บ๋ฆญํฐ ๋ชจ๋ธ์ Inspector์ ํ์ธํด Animator ์ปดํฌ๋ํธ์ Controller๋ฅผ ์๊น ์์ฑํด์ ์ค์ ํ MainAnimator๋ฅผ ์ ์ฉ. ์ด์ ์คํฌ๋ฆฝํธ๋ฅผ ์จ์ค๋ค. [Main Controller.cs] using System.Collections; using System.Collections.Generic; using .. 2021. 11. 28. ์ ๋ํฐ - ์นด๋ฉ๋ผ ํ๋ ์ด์ด์๊ฒ ๊ณ ์ ํ๊ธฐ [FollowPlayer.cs] using System.Collections; using System.Collections.Generic; using UnityEngine; public class FollowPlayer : MonoBehaviour { public GameObject player; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { transform.position = player.transform.position + new Vector3(0, 1.5f, -8) ; } } Player ๊ฐ์ ์ค ๋์๋ ์ค๋ฅธ์ชฝ์ ์์ฃผ ์์ ๋๊ทธ๋ผ๋ฏธ๊ฐ ๋ณด.. 2021. 11. 28. ์ ๋ํฐ - ๊ฐ์ฅ ๊ธฐ๋ณธ์ ์ธ ์์น ์ด๋ [Basic_Move.cs] using System.Collections; using System.Collections.Generic; using UnityEngine; public class Basic_Move : MonoBehaviour { public int Speed; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { if( Input.GetKey (KeyCode.LeftArrow) ){ transform.Translate ( Vector3.left * Speed * Time.deltaTime ); } if( Input.GetKey (Key.. 2021. 11. 28. ์ด์ 1 ๋ค์ 728x90 ๋ฐ์ํ