Notice
Recent Posts
Recent Comments
Link
«   2024/07   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Archives
Today
Total
관리 메뉴

브래의 슬기로운 코딩 생활

모바일 게임 실무 4주차 정리 (FPS) 본문

2-2/모바일 게임 실무

모바일 게임 실무 4주차 정리 (FPS)

김브래 2023. 9. 29. 21:26

cc = GetComponentInParent<CharacterController>();

- 부모 객체의 Character Controller을 cc변수에 저장

 

vrCamera.eulerAngles.x // x축으로 기울어진 각도

vrCamera.TransformDirection //월드축 방향

cc.SimpleMove // 캐릭터의 스피드 값을 받아 그 만큼 이동시켜주는 함수

 

*Animator의 이름이 다른 이름이면 소스에도 그 이름을 사용 

Animator anim; // 애니메이션 객체 anim선언

anim = GetComponent<Animator>(); // anim에게 Animator 속성 부여

anim.Play("Base Layer.Idle"); // 괄호 안의 애니메이션 실행

 

OnPointerExit - 카메라가 객체를 바라보지 않으면

OnPointerEnter - 카메라가 객체를 바라보면

 

StartCoroutine("CatEat"); // 괄호안의 코루틴 시작

StopAllCoroutines(); // 모든 코루틴 종료

 

_gazedAtObject.SendMessage(" OnPointerExit "); // 쳐다본 객체에게 괄호 안의 메세지 전송