728x90
반응형

aa 24

AA(4) - 플레이어 회피

애니메이터에 회피를 추가해줍니다. 닷지 파타메터는 트리거로 해줍니다. 애니메이터 설정이 끝났으니 스크립트를 작성해줍니다. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player : MonoBehaviour { public float speed; float hAxis; float vAxis; bool wDown; bool jDown; bool isJump; bool isDodge; Vector3 moveVec; Rigidbody rigid; Animator anim; void Awake() { rigid = GetComponent(); anim = GetComponentInChildre..

AA(1) - 플레이어 이동

https://youtu.be/qORoTfF0Nx0 에셋 툴과 강의는 위 링크 채널의 강의를 참고했습니다. 큐브를 이용해 바닥과 벽을 만들어줍니다. 시야를 가리는 벽은 매쉬랜더러를 꺼서 충돌은 하나 보이지 않게 해줍니다. 바닥과 벽면에 적용할 매터리얼을 만들고 적용시킵니다. 색을 변경하고 타일 갯수를 늘려줍니다. 프리팹에서 플레이어를 가져와줍니다. 리지드바디와 캡슐콜라이더, 빈 스크립트를 넣어줍니다. 캡슐콜라이더 크기를 조정해줍니다. using System.Collections; using System.Collections.Generic; using UnityEngine; public class Player : MonoBehaviour { public float speed; float hAxis; flo..

728x90
반응형