๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
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.
728x90
๋ฐ˜์‘ํ˜•